Data transmission method, device, and system

ABSTRACT

A data transmission method includes receiving, by a user plane function entity, a data packet from a first terminal through an uplink path corresponding to the first terminal, where the data packet carries addressing information of a second terminal; determining, by the user plane function entity based on information about the uplink path corresponding to the first terminal and the addressing information of the second terminal, a downlink path corresponding to the second terminal; and sending, by the user plane function entity, the data packet to the second terminal through the downlink path corresponding to the second terminal.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2018/101465, filed on Aug. 21, 2018, which claims priority toChinese Patent Application No. 201710758372.4, filed on Aug. 29, 2017,and Chinese Patent Application No. 201810890123.5, filed on Aug. 7,2018. The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a data transmission method, a device, and asystem.

BACKGROUND

A local area network (LAN) is a computer communications network thatinterconnects various computers, external devices, and databases withina local geographical range, for example, a school, a factory, or aninstitution. The local area network may be connected to a remote localarea network, database, or processing center by using a datacommunication network or a dedicated data circuit, to construct alarge-scale information processing system. With emergence of a newenterprise office mode and a smart home mode, a wired LAN and a wirelessLAN (WLAN) expose shortcomings in aspects such as complex deployment,flexibility, mobility, and coverage. This encourages further developmentof a LAN technology, to adapt to requirements of future applications forthe LAN.

A network that directly provides a LAN service by utilizing a widecoverage characteristic of a mobile network is referred to as a mobilelocal area network (MLAN). The MLAN may be used within a more extensivemobile network coverage area. In other words, even if users are locatedin a same area, the users can implement LAN-based data exchange orcommunication provided that they access a same MLAN. A mobile networkwith wide coverage is utilized, so that creating, expansion, migration,and adjustment of the MLAN can be automatically completed by using themobile network without manual intervention. In addition, an MLAN may becustomized according to a requirement, and different MLANs are securelyisolated with each other.

However, in the MLAN, when two terminals correspond to a same user planefunction (UPF) entity, there is currently no related solution for howthe two terminals locally interact with each other.

SUMMARY

Embodiments of this application provide a data transmission method, adevice, and a system, so that when two terminals correspond to a sameUPF entity, the two terminals can locally interact with each other.

To achieve the foregoing objective, the embodiments of this applicationprovide the following technical solutions.

According to a first aspect, a data transmission method is provided, andthe method includes: receiving, by a user plane function entity, a datapacket from a first terminal through an uplink path corresponding to thefirst terminal, where the data packet carries addressing information ofa second terminal; determining, by the user plane function entity basedon information about the uplink path corresponding to the first terminaland the addressing information of the second terminal, a downlink pathcorresponding to the second terminal; and sending, by the user planefunction entity, the data packet to the second terminal through thedownlink path corresponding to the second terminal. Based on thissolution, after receiving the data packet from the first terminalthrough the uplink path corresponding to the first terminal, the userplane function entity can determine, based on the information about theuplink path corresponding to the first terminal and the addressinginformation of the second terminal, the downlink path corresponding tothe second terminal, and can further send the data packet to the secondterminal through the downlink path corresponding to the second terminal.Therefore, when two terminals correspond to a same user plane functionentity, the two terminals can locally interact with each other.

In a possible design, the determining, by the user plane function entitybased on information about the uplink path corresponding to the firstterminal and the addressing information of the second terminal, adownlink path corresponding to the second terminal includes:determining, by the user plane function entity based on the informationabout the uplink path corresponding to the first terminal, an identifierof a mobile local area network MLAN to which the first terminalsubscribes; and determining, by the user plane function entity based onthe identifier of the MLAN and the addressing information of the secondterminal, the downlink path corresponding to the second terminal. Basedon this solution, the downlink path corresponding to the second terminalcan be determined in the MLAN.

In a possible design, the determining, by the user plane function entitybased on the information about the uplink path corresponding to thefirst terminal, an identifier of an MLAN to which the first terminalsubscribes includes: determining, by the user plane function entitybased on the information about the uplink path corresponding to thefirst terminal and a first correspondence, the identifier of the MLAN towhich the first terminal subscribes, where the first correspondenceincludes a correspondence between the information about the uplink pathcorresponding to the first terminal and the identifier of the MLAN.Based on this solution, the identifier of the MLAN to which the firstterminal subscribes can be determined.

In a possible design, the determining, by the user plane function entitybased on the identifier of the MLAN and the addressing information ofthe second terminal, the downlink path corresponding to the secondterminal includes: determining, by the user plane function entity basedon the identifier of the MLAN, the addressing information of the secondterminal, and a second correspondence, the downlink path correspondingto the second terminal, where the second correspondence includes acorrespondence between information about the downlink path correspondingto the second terminal, the addressing information of the secondterminal, and the identifier of the MLAN. Based on this solution, thedownlink path corresponding to the second terminal can be determined inthe MLAN.

In a possible design, the method further includes: obtaining, by theuser plane function entity, the addressing information of the secondterminal, where the addressing information of the second terminalincludes an internet protocol IP address of the second terminal or amedia access control MAC address of the second terminal. Based on thissolution, the user plane function entity can obtain the addressinginformation of the second terminal.

In a possible design, the addressing information of the second terminalincludes the IP address of the second terminal; and the obtaining, bythe user plane function entity, the addressing information of the secondterminal includes: receiving, by the user plane function entity, the IPaddress of the second terminal from a session management functionentity, where the IP address of the second terminal is determined basedon the identifier of the MLAN. Based on this solution, the user planefunction entity can obtain the IP address of the second terminal.

In a possible design, the addressing information of the second terminalincludes the MAC address of the second terminal; and the obtaining, bythe user plane function entity, the addressing information of the secondterminal includes: receiving, by the user plane function entity, the MACaddress of the second terminal from the second terminal during an MLANsession establishment process. Based on this solution, the user planefunction entity can obtain the MAC address of the second terminal.

In a possible design, the addressing information of the second terminalincludes the MAC address of the second terminal; and the obtaining, bythe user plane function entity, the addressing information of the secondterminal includes: receiving, by the user plane function entity, adynamic host configuration protocol DHCP request from the secondterminal through an uplink path of the second terminal, where the DHCPrequest carries the MAC address of the second terminal; sending, by theuser plane function entity, the DHCP request to a session managementfunction entity; and receiving, by the user plane function entity, theMAC address of the second terminal from the session management functionentity. Based on this solution, the user plane function entity canobtain the MAC address of the second terminal.

In a possible design, the addressing information of the second terminalincludes the MAC address of the second terminal; and the obtaining, bythe user plane function entity, the addressing information of the secondterminal includes: receiving, by the user plane function entity, a DHCPrequest from the second terminal through an uplink path of the secondterminal, where the DHCP request carries the MAC address of the secondterminal; and parsing, by the user plane function entity, the DHCPrequest, to obtain the MAC address of the second terminal. Based on thissolution, the user plane function entity can obtain the MAC address ofthe second terminal.

In a possible design, the method further includes: obtaining, by theuser plane function entity, the identifier of the MLAN to which thesecond terminal subscribes and the information about the downlink pathcorresponding to the second terminal; and establishing, by the userplane function entity, the second correspondence based on the identifierof the MLAN, the addressing information of the second terminal, and theinformation about the downlink path corresponding to the secondterminal. Based on this solution, the user plane function entity canestablish the second correspondence.

In a possible design, before the receiving, by the user plane functionentity, a DHCP request from the second terminal through an uplink pathof the second terminal, the method further includes: obtaining, by theuser plane function entity, information about the uplink pathcorresponding to the second terminal, the identifier of the MLAN towhich the second terminal subscribes, and the information about thedownlink path corresponding to the second terminal; and establishing, bythe user plane function entity, a third correspondence based on theinformation about the uplink path corresponding to the second terminal,the information about the downlink path corresponding to the secondterminal, and the identifier of the MLAN, where the third correspondenceincludes a correspondence between the information about the uplink pathcorresponding to the second terminal, the information about the downlinkpath corresponding to the second terminal, and the identifier of theMLAN; and after the receiving, by the user plane function entity, a DHCPrequest from the second terminal through an uplink path corresponding tothe second terminal, the method further includes: establishing, by theuser plane function entity, the second correspondence based on the thirdcorrespondence and the MAC address of the second terminal. Based on thissolution, the user plane function entity can establish the secondcorrespondence.

In a possible design, the method further includes: obtaining, by theuser plane function entity, the identifier of the MLAN to which thefirst terminal subscribes and the information about the uplink pathcorresponding to the first terminal; and establishing, by the user planefunction entity, the first correspondence based on the identifier of theMLAN and the information about the uplink path corresponding to thefirst terminal. Based on this solution, the user plane function entitycan establish the first correspondence.

In a possible design, the information about the uplink pathcorresponding to the first terminal includes a tunnel identifier of theuser plane function entity that is allocated for the first terminal; andthe information about the downlink path corresponding to the secondterminal includes a tunnel identifier of an access device that isallocated for the second terminal.

According to a second aspect, a user plane function entity is provided,and the user plane function entity has a function of implementing themethod in the first aspect. The function may be implemented by hardware,or may be implemented by executing corresponding software by hardware.The hardware or software includes one or more modules that correspond tothe foregoing function.

According to a third aspect, a user plane function entity is provided,and includes: a processor and a memory, where the memory is configuredto store a computer execution instruction, and when the user planefunction entity runs, the processor executes the computer executioninstruction stored in the memory, so that the user plane function entityis enabled to perform the data transmission method in any one of thefirst aspect or the possible designs of the first aspect.

According to a fourth aspect, a computer-readable storage medium isprovided, the computer-readable storage medium stores an instruction,and when the instruction is run on a computer, the computer is enabledto perform the data transmission method in any one of the first aspector the possible designs of the first aspect.

According to a fifth aspect, a computer program product including aninstruction is provided. When the computer program product is run on acomputer, the computer is enabled to perform the data transmissionmethod in any one of the first aspect or the possible designs of thefirst aspect.

According to a sixth aspect, a chip system is provided. The chip systemincludes a processor, where the processor is configured to support auser plane function entity in implementing the functions in theforegoing aspects, for example, determining, based on information aboutan uplink path corresponding to a first terminal and addressinginformation of a second terminal, a downlink path corresponding to thesecond terminal. In a possible design, the chip system further includesa memory, where the memory is configured to store a program instructionand data that are necessary for a user plane function entity. The chipsystem may include a chip, or may include a chip and another discretedevice.

For technical effects brought in by any design manner in the secondaspect to the sixth aspect, refer to technical effects brought in bydifferent design manners in the first aspect. Details are not describedherein again.

According to a seventh aspect, a mobility management entity is provided.The mobility management entity includes a transceiver module and aprocessing module, where the transceiver module is configured to receivea registration or re-registration request from a terminal; theprocessing module is configured to obtain, from a database entity, anidentifier of a mobile local area network MLAN to which the terminalsubscribes; and the transceiver module is further configured to send theidentifier of the MLAN to the terminal. Based on this solution, theidentifier of the MLAN to which the terminal subscribes can beconfigured on the terminal.

In a possible design, the identifier of the MLAN is an identifiercorresponding to a specific area; and the transceiver module is furtherconfigured to: when the processing module determines that a currentregistration area of the terminal overlaps the specific area, send theidentifier of the MLAN to the terminal.

In a possible design, the transceiver module is further configured toreceive the identifier of the MLAN from the terminal during an MLANsession establishment process, where the identifier of the MLAN is usedto establish an MLAN session.

According to an eighth aspect, a data transmission system is provided.The data transmission system includes the user plane function entity inany one of the foregoing aspects and the mobility management entity inany one of the foregoing aspects.

According to a ninth aspect, a data transmission method is provided. Thedata transmission method includes: obtaining, by a session managementnetwork element, an identifier of a mobile local area network MLANassociated with a session of a terminal; determining, by the sessionmanagement network element, an uplink data forwarding rule based on theidentifier of the MLAN, where the uplink data forwarding rule includes alabel of the MLAN and information about an uplink path corresponding tothe session; and sending, by the session management network element, theuplink data forwarding rule to a user plane network element, where theuplink data forwarding rule is used to instruct the user plane networkelement to forward, by using routing information corresponding to thelabel of the MLAN, uplink data received on the uplink path. Based onthis solution, the session management network element can determine theuplink data forwarding rule based on the identifier of the MLAN, andsend the uplink data forwarding rule to the user plane network element,and the uplink data forwarding rule is used to instruct the user planenetwork element to forward, by using the routing informationcorresponding to the label of the MLAN, the uplink data received on theuplink path. Therefore, when two terminals correspond to a same userplane function network element, the two terminals can locally interactwith each other.

In a possible design, the obtaining, by a session management networkelement, an identifier of an MLAN associated with a session of aterminal is: receiving, by the session management network element, asession establishment request from the terminal, where the sessionestablishment request includes the identifier of the MLAN; or receiving,by the session management network element, a request message from amobility management network element, where the request message includesthe identifier of the MLAN. Based on this solution, the sessionmanagement network element can obtain the identifier of the MLANassociated with the session for the terminal.

In a possible design, the determining, by the session management networkelement, an uplink data forwarding rule based on the identifier of theMLAN is: obtaining, by the session management network element, the labelof the MLAN based on the identifier of the MLAN; and generating, by thesession management network element, the uplink data forwarding rulebased on the label of the MLAN and the information that is about theuplink path corresponding to the session and that is allocated for theterminal. Based on this solution, the session management network elementcan determine the uplink data forwarding rule.

In a possible design, the obtaining, by the session management networkelement, the label of the MLAN based on the identifier of the MLAN is:obtaining, by the session management network element, subscription dataof the MLAN of the terminal based on the identifier of the MLAN, wherethe subscription data includes the label of the MLAN; or obtaining, bythe session management network element, authentication data of the MLANof the terminal based on the identifier of the MLAN, where theauthentication data includes the label of the MLAN; or allocating, bythe session management network element, the label of the MLAN for thesession based on the identifier of the MLAN; or determining, by thesession management network element, the identifier of the MLAN as thelabel of the MLAN. Based on this solution, the session managementnetwork element can obtain the label of the MLAN.

In a possible design, the data transmission method provided in thisembodiment of this application further includes: obtaining, by thesession management network element, a downlink data forwarding rule,where the downlink data forwarding rule includes the label of the MLANand addressing information of the terminal; and sending, by the sessionmanagement network element, the downlink data forwarding rule to theuser plane network element, where the downlink data forwarding rule isused to instruct the user plane network element to forward, by using therouting information corresponding to the label of the MLAN, downlinkdata to be sent to an address corresponding to the addressinginformation of the terminal. Based on this solution, the sessionmanagement network element can obtain the downlink data forwarding rule,and send the downlink data forwarding rule to the user plane networkelement, and the downlink data forwarding rule is used to instruct theuser plane network element to forward, by using the routing informationcorresponding to the label of the MLAN, the downlink data to be sent tothe address corresponding to the addressing information of the terminal.Therefore, when two terminals correspond to a same user plane functionnetwork element, the two terminals can locally interact with each other.

In a possible design, the data transmission method provided in thisembodiment of this application further includes: obtaining, by thesession management network element, a downlink data forwarding rule,where the downlink data forwarding rule includes the label of the MLAN,addressing information of the terminal, and information about a downlinkpath corresponding to the session; and sending, by the sessionmanagement network element, the downlink data forwarding rule to theuser plane network element, where the downlink data forwarding rule isused to instruct the user plane network element to update the routinginformation corresponding to the label of the MLAN, and forward, byusing the downlink path in updated routing information corresponding tothe label of the MLAN, downlink data to be sent to an addresscorresponding to the addressing information of the terminal. Based onthis solution, the session management network element can obtain thedownlink data forwarding rule, and send the downlink data forwardingrule to the user plane network element, and the downlink data forwardingrule is used to instruct the user plane network element to update therouting information corresponding to the label of the MLAN, and forward,by using the downlink path in the updated routing informationcorresponding to the label of the MLAN, the downlink data to be sent toan address corresponding to the addressing information of the terminal.Therefore, when two terminals correspond to a same user plane functionnetwork element, the two terminals can locally interact with each other.

According to a tenth aspect, a session management network element isprovided, and the session management network element has a function ofimplementing the method in the ninth aspect. The function may beimplemented by hardware, or may be implemented by executingcorresponding software by hardware. The hardware or software includesone or more modules corresponding to the foregoing function.

According to an eleventh aspect, a session management network element isprovided, and includes: a processor and a memory, where the memory isconfigured to store a computer execution instruction, and when thesession management network element runs, the processor executes thecomputer execution instruction stored in the memory, so that the sessionmanagement network element is enabled to perform the data transmissionmethod in any one of the ninth aspect or the possible designs of theninth aspect.

According to twelfth aspect, a session management network element isprovided, and includes a processor. The processor is configured tocouple to a memory, and configured to read an instruction in the memoryand perform the data transmission method in any one of the ninth aspector the possible designs of the ninth aspect according to theinstruction.

According to a thirteenth aspect, a computer-readable storage medium isprovided, where the computer-readable storage medium stores aninstruction, and when the instruction is run on a computer, the computeris enabled to perform the data transmission method in any one of theninth aspect or the possible designs of the ninth aspect.

According to a fourteenth aspect, a computer program product includingan instruction is provided. When the computer program product is run ona computer, the computer is enabled to perform the data transmissionmethod in any one of the ninth aspect or the possible designs of theninth aspect.

According to a fifteenth aspect, a chip system is provided, where thechip system includes a processor, and the processor is configured tosupport a session management network element in implementing thefunctions in the foregoing aspects, for example, obtaining an identifierof an MLAN associated with a session of a terminal, and determining anuplink data forwarding rule based on the identifier of the MLAN. In apossible design, the chip system further includes a memory, and thememory is configured to store a program instruction and data that arenecessary for a session management network element. The chip system mayinclude a chip, or may include a chip and another discrete device.

For technical effects brought in by any design manner in the tenthaspect to the fifteenth aspect, refer to technical effects brought in bydifferent design manners in the ninth aspect. Details are not describedherein again.

According to a sixteenth aspect, a data transmission system is provided.The data transmission system includes: a session management networkelement and a user plane network element, where the session managementnetwork element is configured to obtain an identifier of a mobile localarea network MLAN associated with a session of a terminal; the sessionmanagement network element is further configured to determine an uplinkdata forwarding rule based on the identifier of the MLAN, where theuplink data forwarding rule includes a label of the MLAN and informationabout an uplink path corresponding to the session; the sessionmanagement network element is further configured to send the uplink dataforwarding rule to the user plane network element, where the uplink dataforwarding rule is used to instruct the user plane network element toforward, by using routing information corresponding to the label of theMLAN, uplink data received on the uplink path; and the user planenetwork element is configured to receive the uplink data forwarding rulefrom the session management network element.

In a possible design, the user plane network element is furtherconfigured to forward, based on the uplink data forwarding rule by usingrouting information corresponding to the label of the MLAN, uplink datareceived on the uplink path.

In a possible design, the session management network element is furtherconfigured to obtain a downlink data forwarding rule, where the downlinkdata forwarding rule includes the label of the MLAN and addressinginformation of the terminal; the session management network element isfurther configured to send the downlink data forwarding rule to the userplane network element, where the downlink data forwarding rule is usedto instruct the user plane network element to forward, by using therouting information corresponding to the label of the MLAN, downlinkdata to be sent to an address corresponding to the addressinginformation of the terminal; and the user plane network element isfurther configured to receive the downlink data forwarding rule from thesession management network element, and forward, based on the downlinkdata forwarding rule by using the routing information corresponding tothe label of the MLAN, the downlink data to be sent to the addresscorresponding to the addressing information of the terminal.

In a possible design, the session management network element is furtherconfigured to obtain a downlink data forwarding rule, where the downlinkdata forwarding rule includes the label of the MLAN, addressinginformation of the terminal, and information about a downlink pathcorresponding to the session; the session management network element isfurther configured to send the downlink data forwarding rule to the userplane network element, where the downlink data forwarding rule is usedto instruct to update the routing information corresponding to the labelof the MLAN, and enable the user plane network element to forward, byusing the downlink path in updated routing information corresponding tothe label of the MLAN, downlink data to be sent to an addresscorresponding to the addressing information of the terminal; and theuser plane network element is further configured to receive the downlinkdata forwarding rule from the session management network element,update, based on the downlink data forwarding rule, the routinginformation corresponding to the label of the MLAN, and forward, byusing the downlink path in the updated routing information correspondingto the label of the MLAN, downlink data to be sent to an addresscorresponding to the addressing information of the terminal.

For technical effects brought in by any design manner in the sixteenthaspect, refer to technical effects brought in by different designmanners in the ninth aspect. Details are not described herein again.

These aspects or other aspects in this application may be clearer andeasier to understand in description of the following embodiments.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic architectural diagram of a data transmissionsystem according to an embodiment of this application;

FIG. 2 is a schematic diagram of application of a data transmissionsystem in 5G according to an embodiment of this application;

FIG. 3 is a schematic diagram of a hardware apparatus of acommunications device according to an embodiment of this application;

FIG. 4A, FIG. 4B, and FIG. 4C are a schematic flowchart 1 of a datatransmission method according to an embodiment of this application;

FIG. 5A, FIG. 5B, FIG. 5C, and FIG. 5D are a schematic flowchart 2 of adata transmission method according to an embodiment of this application;

FIG. 6 is a schematic flowchart of a configuration method of anidentifier of an MLAN according to an embodiment of this application;

FIG. 7 is a schematic structural diagram of a user plane function entityaccording to an embodiment of this application;

FIG. 8 is a schematic structural diagram of a mobility management entityaccording to an embodiment of this application;

FIG. 9 is a schematic architectural diagram of another data transmissionsystem according to an embodiment of this application;

FIG. 10A and FIG. 10B are a schematic flowchart 3 of a data transmissionmethod according to an embodiment of this application; and

FIG. 11 is a schematic structural diagram of a session managementnetwork element according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

To help understand technical solutions of embodiments of thisapplication, the following briefly describes technologies related tothis application.

Identifier (ID) of an MLAN:

An identifier (ID) of an MLAN is used to identify an MLAN instance. IfMLANs are divided based on scenarios such as an enterprise communicationscenario and a vehicle to everything communication (V2X) scenario, MLANscenarios of a same type may be identified by using an MLAN type or adata network name (DNN). In other words, an identifier of one MLANincludes a scenario identifier and an MLAN number. A specific MLANinstance in MLAN scenarios of a same type can be uniquely identifiedwith reference to a scenario identifier and an MLAN number. If DNNresources are abundant, MLANs do not need to be divided based onscenarios, and an identifier of one MLAN corresponds to a unique MLANinstance of one DNN. Whether MLANs are divided based on scenarios is notspecifically limited in the following embodiments of this application.An example in which an identifier of one MLAN can uniquely identify oneMLAN instance is merely used for description. This is described hereinfor once, and details are not described below again.

In addition, in the embodiments of this application, an identifier of anMLAN may correspond to a specific service scope, or may be used within aglobal range. A service scope corresponding to an identifier of an MLANis not specifically limited in the embodiments of this application.

Tunnel:

A tunnel includes a next generation (N) interface 3 (N3) tunnel and an Ninterface 9 (N9) tunnel. The N3 tunnel is a tunnel between an accessdevice (for example, a base station) and a user plane function entity;and the N9 tunnel is a tunnel between user plane function entities.Generally, the N3 tunnel is a tunnel at a granularity of a session; andthe N9 tunnel may be a tunnel at a granularity of a session, or may be atunnel at a granularity of a device.

The tunnel at a granularity of a session refers to a tunnel resourceestablished for a session, and the tunnel is used for only one session.The tunnel at a granularity of a session includes only one routing rule,and only the routing rule can be correspondingly used for forwardingdata on the tunnel. In addition, a life cycle of the tunnel at agranularity of a session is a life cycle of a session. In other words,when a session disappears or is released, the tunnel at a granularity ofa session also needs to be released.

The tunnel at a granularity of a device refers to a tunnel resourceestablished for one or more sessions, and the tunnel can be used for oneor more sessions. The tunnel at a granularity of a device may includeone or more routing rules, and the one or more routing rules each can becorrespondingly used for forwarding data on the tunnel. In addition, alife cycle of the tunnel at a granularity of a device is life cycles ofa plurality of sessions corresponding to the tunnel. In other words,assuming that the tunnel at a granularity of a device corresponds to Msessions, when first M-1 sessions of the plurality of sessionscorresponding to the tunnel disappear or are released, only a routingrule corresponding to a corresponding session is released, and thetunnel at a granularity of a device can be released only when an M^(th)session in the plurality of sessions corresponding to the tunneldisappears or is released. When the M^(th) session in the plurality ofsessions corresponding to the tunnel disappears or is released, thetunnel at a granularity of a device may be alternatively reserved, sothat the tunnel does not need to be subsequently re-established. This isnot specifically limited in the embodiments of this application.

The session in the embodiments of this application may be, for example,a protocol data unit (PDU) session. This is described herein for once,and details are not described below again.

A tunnel in the following embodiments of this application relates toonly the N3 tunnel, and does not relate to the N9 tunnel. This isdescribed herein for once, and details are not described below again.

Third. Path Information:

Path information in the embodiments of this application includesinformation about an uplink path corresponding to a first terminal,information about a downlink path corresponding to the first terminal,information about an uplink path corresponding to a second terminal, andinformation about a downlink path corresponding to the second terminal.The information about the uplink path corresponding to the firstterminal is used to determine the uplink path corresponding to the firstterminal; the information about the downlink path corresponding to thefirst terminal is used to determine the downlink path corresponding tothe first terminal; the information about the uplink path correspondingto the second terminal is used to determine the uplink pathcorresponding to the second terminal; and the information about thedownlink path corresponding to the second terminal is used to determinethe downlink path corresponding to the second terminal. In addition, theinformation about the uplink path corresponding to the first terminaland the information about the downlink path corresponding to the firstterminal may also be used to determine a tunnel that is established forthe first terminal between a first access device and a first user planefunction entity; and the information about the uplink path correspondingto the second terminal and the information about the downlink pathcorresponding to the second terminal may be used to determine a tunnelthat is established for the second terminal between a second accessdevice and a second user plane function entity.

In the embodiments of this application, the first user plane functionentity and the second user plane function entity are a same user planefunction entity; and the first access device and the second accessdevice may be a same access device, or may be different access devices.This is not specifically limited in the embodiments of this application.

In the embodiments of this application, the information about the uplinkpath corresponding to the first terminal may include a tunnel identifierof the first user plane function entity that is allocated for the firstterminal; the information about the downlink path corresponding to thefirst terminal may include a tunnel identifier of the first accessdevice that is allocated for the first terminal; the information aboutthe uplink path corresponding to the second terminal may include atunnel identifier of the second user plane function entity that isallocated for the second terminal; and the information about thedownlink path corresponding to the second terminal may include a tunnelidentifier of the second access device that is allocated for the secondterminal. The tunnel identifier may be, for example, a tunnel endpointidentifier (TEID). This is not specifically limited in the embodimentsof this application.

The information about the uplink path corresponding to the firstterminal, the information about the downlink path corresponding to thefirst terminal, the information about the uplink path corresponding tothe second terminal, and the information about the downlink pathcorresponding to the second terminal may further include otherinformation. For example, the information about the uplink pathcorresponding to the first terminal may further include an IP address ofa user plane function entity; the information about the downlink pathcorresponding to the first terminal may further include an IP address ofthe first access device; the information about the uplink pathcorresponding to the second terminal may further include an IP addressof a user plane function entity; and the information about the downlinkpath corresponding to the second terminal may further include an IPaddress of the second access device, and so on. This is not specificallylimited in the embodiments of this application.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. In descriptions of this application,“I” means “or” unless otherwise specified. For example, A/B mayrepresent A or B. In this specification, “and/or” describes only anassociation relationship for describing associated objects andrepresents that three relationships may exist. For example, A and/or Bmay represent the following three cases: Only A exists, both A and Bexist, and only B exists. In addition, in the descriptions in thisapplication, “a plurality of” means two or more than two unlessotherwise specified. In addition, to help describe the technicalsolutions in the embodiments of this application more clearly, in theembodiments of this application, words such as “first” and “second” areused to distinguish between same items whose functions and roles arebasically the same or similar items. A person skilled in the art mayunderstand that the words such as “first” and “second” do not constitutea limitation to a quantity and an execution sequence, and the words suchas “first” and “second” are not necessarily different.

A network architecture and a service scenario described in theembodiments of this application are intended to describe the technicalsolutions in the embodiments of this application more clearly, and donot constitute a limitation to the technical solutions provided in theembodiments of this application. A person of ordinary skill in the artmay learn that, with evolution of the network architecture andappearance of a new service scenario, the technical solutions providedin the embodiments of this application are also applicable to a similartechnical problem.

FIG. 1 is a schematic architectural diagram of a data transmissionsystem 10 according to an embodiment of this application. The datatransmission system 10 includes a user plane function entity 101, afirst access device 102, and a second access device 103.

A first terminal communicates with the user plane function entity 101through the first access device 102, and a second terminal communicateswith the user plane function entity 101 through the second access device103.

The user plane function entity 101 is configured to receive a datapacket from the first terminal through an uplink path corresponding tothe first terminal, where the data packet carries addressing informationof the second terminal.

The user plane function entity 101 is further configured to determine,based on information about the uplink path corresponding to the firstterminal and the addressing information of the second terminal, adownlink path corresponding to the second terminal.

The user plane function entity 101 is further configured to send thedata packet to the second terminal through the downlink pathcorresponding to the second terminal.

Optionally, in this embodiment of this application, the first accessdevice 102 and the second access device 103 may be a same access device,or may be different access devices. This is not specifically limited inthis embodiment of this application.

Optionally, in this embodiment of this application, the user planefunction entity may directly communicate with the first access device102 or the second access device 103, or may communicate with the firstaccess device 102 or the second access device 103 through forwarding byanother device. This is not specifically limited in this embodiment ofthis application.

According to the data transmission system provided in this embodiment ofthis application, after receiving the data packet from the firstterminal through the uplink path corresponding to the first terminal,the user plane function entity can determine, based on the informationabout the uplink path corresponding to the first terminal and theaddressing information of the second terminal, the downlink pathcorresponding to the second terminal, and can further send the datapacket to the second terminal through the downlink path corresponding tothe second terminal. Therefore, when two terminals correspond to a sameuser plane function entity, the two terminals can locally interact witheach other.

Optionally, the data transmission system 10 may be applied to a 5thgeneration (5G) network and future other networks. This is notspecifically limited in this embodiment of this application.

If the data transmission system 10 is applied to a 5G network, as shownin FIG. 2 , a network element or entity corresponding to the user planefunction entity 101 may be a UPF entity; a network element or entitycorresponding to the first access device 102 may be a first accessnetwork (AN) device; and a network element or entity corresponding tothe second access device 103 may be a second AN device. The firstterminal accesses the network through the first AN device, and thesecond terminal accesses the network through the second AN device. Thefirst AN device and the second AN device each communicate with the UPFentity through an N3 interface (N3).

In addition, as shown in FIG. 2 , the 5G network may further include anaccess and mobility management function (AMF) entity, a sessionmanagement function (SMF) entity, a unified data management (UDM)entity, an authentication server function (AUSF) entity, a policycontrol function (PCF) entity, and the like. This is not specificallylimited in this embodiment of this application.

The first terminal and the second terminal each communicate with the AMFentity through an N1 interface (N1); the first AN device and the secondAN device each communicate with the AMF entity through an N2 interface(N2); the AMF entity communicates with the AUSF entity through an N12interface (N12); the AMF entity communicates with the UDM entity throughan N8 interface (N8); the AMF entity communicates with the SMF entitythrough an N11 interface (N11); the AMF entity communicates with the PCFentity through an N15 interface (N15); the AUSF entity communicates withthe UDM entity through an N13 interface (N13); and the SMF entitycommunicates with the UPF entity through an N4 interface (N4).

Optionally, if the first AN device and the second AN device aredifferent AN devices, the first AN device and the second AN device maybe connected to different AMF entities. This is not specifically limitedin this embodiment of this application.

It should be noted that, names of interfaces between the networkelements in FIG. 2 are merely used as an example. During implementation,names of the interfaces may be other names. This is not specificallylimited in this embodiment of this application.

It should be noted that, the first AN device, the second AN device, theAMF entity, the SMF entity, the AUSF entity, the UDM entity, the UPFentity, the PCF entity, and the like in FIG. 2 are only names, and thenames do not constitute a limitation to the devices. In the 5G networkand future other networks, network elements or entities corresponding tothe first AN device, the second AN device, the AMF entity, the SMFentity, the AUSF entity, the UDM entity, the UPF entity, and the PCFentity may alternatively be other names. This is not specificallylimited in this embodiment of this application. For example, the UDMentity may be alternatively replaced with a home subscriber server(HSS), a user subscription database (USD), a database entity, or thelike. This is described herein for once, and details are not describedbelow again.

FIG. 9 is a schematic architectural diagram of a data transmissionsystem 90 according to an embodiment of this application. The datatransmission system 90 includes a session management network element 901and a user plane network element 902.

The session management network element 901 is configured to obtain anidentifier of an MLAN associated with a session of a terminal, anddetermine an uplink data forwarding rule based on the identifier of theMLAN, where the uplink data forwarding rule includes a label of the MLANand information about an uplink path corresponding to the session, andthe label of the MLAN is used to identify data in the MLAN or used toidentify an MLAN associated with the session.

The session management network element 901 is further configured to sendthe uplink data forwarding rule to the user plane network element 902,where the uplink data forwarding rule is used to instruct the user planenetwork element 902 to forward, by using routing informationcorresponding to the label of the MLAN, uplink data received on theuplink path.

The user plane network element 902 is configured to receive the uplinkdata forwarding rule from the session management network element 901,and forward, based on the uplink data forwarding rule by using therouting information corresponding to label of the MLAN, the uplink datareceived on the uplink path.

Optionally, in this embodiment of this application, the sessionmanagement network element 901 and the user plane network element 902may directly communicate with each other, or may communicate with eachother through forwarding by another device. This is not specificallylimited in this embodiment of this application.

According to the data transmission system provided in this embodiment ofthis application, the session management network element can determinethe uplink data forwarding rule based on the identifier of the MLAN, andsend the uplink data forwarding rule to the user plane network element,and the uplink data forwarding rule is used to instruct the user planenetwork element to forward, by using the routing informationcorresponding to the label of the MLAN, the uplink data received on theuplink path. Therefore, based on this solution, when two terminalscorrespond to a same user plane function network element, the twoterminals can locally interact with each other.

Optionally, the data transmission system 20 may be applied to a 5Gnetwork and future other networks. This is not specifically limited inthis embodiment of this application.

If the data transmission system 20 is applied to the 5G network, asshown in FIG. 2 , a network element or entity corresponding to thesession management network element 901 may be an SMF network element inthe 5G network; and a network element or entity corresponding to theuser plane network element 902 may be a UPF network element in the 5Gnetwork. For remaining related description of the 5G network, refer tothe embodiment shown in FIG. 2 . Details are not described herein again.

Optionally, the terminal in this embodiment of this application mayinclude various handheld devices, vehicle-mounted devices, wearabledevices, and computing devices that have a wireless communicationsfunction, or another processing device connected to a wireless modem;and the terminal may further include a subscriber unit, a cellularphone, a smart phone, a wireless data card, a personal digital assistant(PDA) computer, a tablet computer, a wireless modem, a handheld device,a laptop computer, a cordless phone or a wireless local loop (WLL)board, a machine type communication (MTC) terminal, user equipment (UE),a mobile station (MS), a terminal device, or the like. For convenienceof description, in this application, the devices mentioned above arecollectively referred to as “terminal”.

Optionally, an access device in this embodiment of this applicationrefers to a device that accesses a core network, and may be, forexample, a base station, a broadband network gateway (BNG), anaggregation switch, a non-3rd generation partnership project (3GPP)access device, or the like. The base station may include a macro basestation, a micro base station (also referred to as a small cell), arelay station, an access point, and the like in various forms.

Optionally, an AMF entity in this embodiment of this application may befurther responsible for functions such as registration management,mobility management, and lawful interception. This is not specificallylimited in this embodiment of this application.

Optionally, an SMF entity in this embodiment of this application isconfigured to perform session management, including sessionestablishment, session modification, session release, allocation andmanagement of an internet protocol (IP) address of a terminal, selectionand control of a UPF entity, and session related control functions suchas lawful interception.

Optionally, the UPF entity in this embodiment of this application has afunction of the user plane function entity in FIG. 1 , and may furtherimplement user plane functions of a serving gateway (SGW) and a packetdata network gateway (PGW). In addition, the UPF entity mayalternatively be a software-defined network (SDN) switch. This is notspecifically limited in this embodiment of this application.

Optionally, an AUSF entity in this embodiment of this application isconfigured to authenticate a terminal based on subscription data of theterminal.

Optionally, a UDM entity in this embodiment of this application isconfigured to store user subscription data. In addition, the UDM entitymay further have functions such as authentication, subscriber identifierprocessing, and subscription management. This is not specificallylimited in this embodiment of this application.

Optionally, a PCF entity in this embodiment of this application providesa policy rule, and supports policy related functions such as managingbehavior of a network by using a unified policy architecture.

Optionally, the user plane function entity in FIG. 1 or the sessionmanagement network element in the embodiment shown in FIG. 9 may beimplemented by an entity device, or may be jointly implemented by aplurality of entity devices, or may be implemented by a logical functionmodule in an entity device. This is not specifically limited in thisembodiment of this application.

For example, the user plane function entity in FIG. 1 or the sessionmanagement network element in the embodiment shown in FIG. 9 may beimplemented by a communications device in FIG. 3 . FIG. 3 is a schematicdiagram of a hardware structure of a communications device according toan embodiment of this application. The communications device 300includes at least one processor 301, a communications bus 302, a memory303, and at least one communications interface 304.

The processor 301 may be a general-purpose central processing unit(CPU), a microprocessor, an application-specific integrated circuit(ASIC), or one or more integrated circuits configured to control programexecution of solutions of this application.

The communications bus 302 may include a channel, to transferinformation between the foregoing components.

The communications interface 304 uses any apparatus such as atransceiver to communicate with another device or communicationsnetwork, for example, Ethernet, a radio access network (RAN), or awireless local area network (WLAN).

The memory 303 may be a read-only memory (ROM), another type of staticstorage device capable of storing static information and an instruction,a random access memory (RAM), or another type of dynamic storage devicecapable of storing information and an instruction; or may be anelectrically erasable programmable read-only memory (EEPROM), a compactdisc read-only memory (CD-ROM) or another optical compact disc storage,an optical disc storage (including a compact optical disc, a laser disc,an optical disc, a digital versatile disc, a Blu-ray disc, or the like),or a magnetic disk storage medium or another magnetic storage device, orany other medium that can be configured to carry or store expectedprogram code in a form of an instruction or a data structure and thatcan be accessed by a computer. However, this does not constitute alimitation herein. The memory may exist independently, and is connectedto the processor through the communications bus 302. Alternatively, thememory may be integrated with the processor.

The memory 303 is configured to store a computer execution instructionused to execute the solutions of this application, and the execution iscontrolled by the processor 301. The processor 301 is configured toexecute the computer execution instruction stored in the memory 303, toimplement the data transmission method provided in the followingembodiments of this application.

During implementation, in an embodiment, the processor 301 may includeone or more CPUs, for example, a CPU 0 and a CPU 1 in FIG. 3 .

During implementation, in an embodiment, the communications device 300may include a plurality of processors, for example, the processor 301and a processor 308 in FIG. 3 . Each of these processors may be asingle-CPU processor, or may be a multi-CPU processor. The processorherein may be one or more devices, circuits, and/or processing coresthat are used to process data (for example, a computer programinstruction).

During implementation, in an embodiment, the communications device 300may further include an output device 305 and an input device 306. Theoutput device 305 communicates with the processor 301, and may displayinformation in a plurality of manners. For example, the output device305 may be a liquid crystal display (LCD), a light emitting diode (LED)display device, a cathode ray tube (CRT) display device, a projector, orthe like. The input device 306 communicates with the processor 301, andmay receive an input of a user in a plurality of manners. For example,the input device 306 may be a mouse, a keyboard, a touchscreen device, asensor device, or the like.

The communications device 300 may be a general-purpose device, or aspecial-purpose device. During implementation, the communications device300 may be a desktop computer, a portable computer, a network server, aPDA, a mobile phone, a tablet computer, a wireless terminal device, abuilt-in device, or a device with a structure similar to that in FIG. 3. This embodiment of this application sets no limitation to a type ofthe communications device 300.

A data transmission method provided in the embodiments of thisapplication is described below in detail with reference to FIG. 1 toFIG. 3 , or FIG. 9 .

Assuming that the data transmission system shown in FIG. 1 is applied tothe 5G network shown in FIG. 2 , a data transmission method provided inan embodiment of this application may be shown in FIG. 4A, FIG. 4B, andFIG. 4C, and includes the following steps.

S401 a. A first terminal sends an MLAN session establishment request toan AMF entity, so that the AMF entity receives the MLAN sessionestablishment request from the first terminal, where the MLAM sessionestablishment request carries an identifier of an MLAN to which thefirst terminal subscribes.

A configuration process of the identifier of the MLAN to which the firstterminal subscribes is described in the following embodiments. Detailsare not described herein.

Optionally, in this embodiment of this application, if the identifier ofthe MLAN to which the first terminal subscribes corresponds to aspecific service scope, information about a specific service areacorresponding to the identifier of the MLAN is further configured on thefirst terminal. In this way, the first terminal can send, based on theinformation about the specific service area corresponding to theidentifier of the MLAN, the MLAN session establishment request to theAMF entity within the specific service area corresponding to theidentifier of the MLAN. If the first terminal sends the MLAN sessionestablishment request to the AMF entity beyond the specific service areacorresponding to the identifier of the MLAN, the AMF entity or an SMFentity may reject, after it is determined that a current location of thefirst terminal is not in the specific service area corresponding to theidentifier of the MLAN, the MLAN session establishment request sent bythe first terminal. This is not specifically limited in this embodimentof this application. In this embodiment of this application, only anexample in which the first terminal initiates a normal MLAN sessionestablishment procedure is used for description. In other words, whenthe identifier of the MLAN to which the first terminal subscribes isavailable within a global range, the first terminal sends the MLANsession establishment request to the AMF entity; alternatively, when theidentifier of the MLAN to which the first terminal subscribescorresponds to a specific service scope, the first terminal sends theMLAN session establishment request within the specific service areacorresponding to the identifier of the MLAN to which the first terminalsubscribes. This is described herein for once, and details are notdescribed below again.

S402 a. The AMF entity selects an SMF entity.

The manner in which the AMF entity selects the SMF entity is notdescribed herein.

S403 a. The AMF entity sends the MLAN session establishment request tothe SMF entity, so that the SMF entity receives the MLAN sessionestablishment request from the AMF entity.

S404 a. The SMF entity selects a UPF entity.

The manner in which the SMF entity selects the UPF entity is notdescribed herein.

Optionally, in this embodiment of this application, the SMF entity mayalternatively obtain, from a UDM entity, the identifier of the MLAN towhich the first terminal subscribes, and determine whether an identifierof an MLAN carried in the MLAN session establishment request is the sameas the identifier of the MLAN to which the first terminal subscribes. Ifthe identifier of the MLAN carried in the MLAN session establishmentrequest is the same as the identifier of the MLAN to which the firstterminal subscribes, it may be determined that the identifier of theMLAN carried in the MLAN session establishment request is the identifierof the MLAN to which the first terminal subscribes, and then asubsequent procedure can be performed; or if the identifier of the MLANcarried in the MLAN session establishment request is different from theidentifier of the MLAN to which the first terminal subscribes, it may bedetermined that the identifier of the MLAN carried in the MLAN sessionestablishment request is not the identifier of the MLAN to which thefirst terminal subscribes, and the procedure ends. This is notspecifically limited in this embodiment of this application.

S405 a. The SMF entity sends an N4 session message to the UPF entity, sothat the UPF entity receives the N4 session message from the SMF entity,where the N4 session message carries the identifier of the MLAN to whichthe first terminal subscribes and addressing information of the firstterminal.

Optionally, in this embodiment of this application, the addressinginformation of the first terminal may be an IP address or media accesscontrol (MAC) address of the first terminal. This is not specificallylimited in this embodiment of this application.

If the addressing information of the first terminal is an IP address,the SMF entity may obtain the IP address of the first terminal in thefollowing manner: An IP address pool corresponding to an identifier ofeach MLAN is configured on the SMF entity, and a correspondence betweenan identifier of an MLAN and information about an IP address pool isestablished. When the first terminal establishes an MLAN session, acorresponding IP address pool can be determined based on an identifierof an MLAN to which the first terminal subscribes and thecorrespondence, and an IP address in the IP address pool is allocatedfor the first terminal.

If the addressing information of the first terminal is a MAC address,the SMF entity may obtain the MAC address of the first terminal in thefollowing manner: The MAC address of the first terminal is carried inthe MLAN session establishment request sent by the first terminal to theSMF entity through the AMF entity, so that the SMF entity can obtain theMAC address from the MLAN session establishment request.

The SMF entity may alternatively obtain the IP address or MAC address ofthe first terminal in another manner. This is not specifically limitedin this embodiment of this application.

S406 a. The UPF entity establishes a correspondence between theidentifier of the MLAN to which the first terminal subscribes andinformation about an uplink path corresponding to the first terminal.

Optionally, in this embodiment of this application, the informationabout the uplink path corresponding to the first terminal may beallocated by the SMF entity, or may be allocated by the UPF entity. Thisis not specifically limited in this embodiment of this application. Ifthe information about the uplink path corresponding to the firstterminal is allocated by the SMF entity, the N4 session message in stepS405 a may further carry the information about the uplink pathcorresponding to the first terminal. This is described herein for once,and details are not described below again.

For ease of description, in this embodiment of this application, thecorrespondence between the identifier of the MLAN to which the firstterminal subscribes and the information about the uplink pathcorresponding to the first terminal is recorded as a correspondence 1.This is described herein for once, and details are not described belowagain. The correspondence 1 may be shown in Table 1.

TABLE 1 Identifier of an MLAN to which a Information about an uplinkpath first terminal subscribes corresponding to the first terminal

Optionally, the correspondence 1 may be alternatively sent to the UPFentity after being created by the SMF entity. This is not specificallylimited in this embodiment of this application.

S407 a. The UPF entity sends the information about the uplink pathcorresponding to the first terminal to a first AN device, so that thefirst AN device receives the information about the uplink pathcorresponding to the first terminal from the UPF entity.

S408 a. The first AN device sends information about a downlink pathcorresponding to the first terminal to the UPF entity, so that the UPFentity receives the information about the downlink path corresponding tothe first terminal from the first AN device.

Optionally, in this embodiment of this application, the informationabout the downlink path corresponding to the first terminal may beallocated by the SMF entity, or may be allocated by the first AN device.This is not specifically limited in this embodiment of this application.

S409 a. The UPF entity establishes a correspondence between theidentifier of the MLAN to which the first terminal subscribes, theinformation about the downlink path corresponding to the first terminal,and the addressing information of the first terminal.

For ease of description, in this embodiment of this application, thecorrespondence between the identifier of the MLAN to which the firstterminal subscribes, the information about the downlink pathcorresponding to the first terminal, and the addressing information ofthe first terminal may be recorded as a correspondence 2. This isdescribed herein for once, and details are not described below again.The correspondence 2 may be shown in Table 2.

TABLE 2 Identifier of an MLAN Information about a downlink Addressing towhich a first path corresponding to the information of the terminalsubscribes first terminal first terminal

Optionally, the correspondence 2 may be alternatively sent to the UPFentity after being created by the SMF entity. This is not specificallylimited in this embodiment of this application.

Steps S401 b to S409 b are similar to steps S401 a to S409 a. Adifference lies in that in steps S401 b to S409 b, the first terminal insteps S401 a to S409 a is replaced with a second terminal, and the firstAN device is replaced with a second AN device. For details, refer tosteps S401 a to S409 a. Details are not described herein again.

In step S406 b, a correspondence that is between an identifier of anMLAN to which the second terminal subscribes and information about anuplink path corresponding to the second terminal and that is establishedby the UPF entity may be recorded as a correspondence 3. This isdescribed herein for once, and details are not described below again.The correspondence 3 may be shown in Table 3.

TABLE 3 Identifier of an MLAN to which a Information about an uplinkpath second terminal subscribes corresponding to the second terminal

In step S409 b, a correspondence that is between the identifier of theMLAN to which the second terminal subscribes, information about adownlink path corresponding to the second terminal, and addressinginformation of the second terminal and that is established by the UPFentity may be recorded as a correspondence 4. This is described hereinfor once, and details are not described below again. The correspondence4 may be shown in Table 4.

TABLE 4 Identifier of an MLAN Information about a downlink Addressing towhich a second path corresponding to the information of the terminalsubscribes second terminal second terminal

Optionally, the correspondence 3 and the correspondence 4 may bealternatively sent to the UPF entity after being created by the SMFentity. This is not specifically limited in this embodiment of thisapplication.

Optionally, to save storage resources, the foregoing Table 1 and Table 2may be combined, and Table 3 and Table 4 may be combined. Combinationresults may be respectively shown in Table 5 and Table 6.

TABLE 5 Identifier of an Information about Information about AddressingMLAN to which a an uplink path a downlink path information firstterminal corresponding to corresponding to of the first subscribes thefirst terminal the first terminal terminal

TABLE 6 Identifier of an Information about Information about AddressingMLAN to which a an uplink path a downlink path information secondterminal corresponding to corresponding to of the second subscribes thesecond the second terminal terminal terminal

Optionally, if the identifier of the MLAN to which the first terminalsubscribes is the same as the identifier of the MLAN to which the secondterminal subscribes, to further save resources, the foregoing Table 5and Table 6 may be combined, and a result is shown in Table 7.

TABLE 7 Identifier of an Information about Information about AddressingMLAN an uplink path a downlink path information Identifier of anInformation about Information about Addressing MLAN to which a an uplinkpath a downlink path information first corresponding to corresponding toof the first terminal/second the first terminal the first terminalterminal terminal subscribes Information about Information aboutAddressing an uplink path a downlink path information corresponding tocorresponding to of the second the second the second terminal terminalterminal

That is, when identities of MLANs to which a plurality of terminalssubscribe are the same, the identities of the MLANs may be recorded asshared information. For example, an established correspondence betweenan identifier of an MLAN, information about an uplink path, informationabout a downlink path, and addressing information may be shown in Table8.

TABLE 8 Identifier of an Information about Information about AddressingMLAN an uplink path a downlink path information a Information aboutInformation about Addressing an uplink path a downlink path informationcorresponding to corresponding to of the first a first terminal thefirst terminal terminal Information about Information about Addressingan uplink path a downlink path information corresponding tocorresponding to of the second a second terminal the second terminalterminal Information about Information about Addressing an uplink path adownlink path information corresponding to corresponding to of the thirda third terminal the third terminal terminal Information aboutInformation about Addressing an uplink path a downlink path informationcorresponding to corresponding to of the fourth a fourth terminal thefourth terminal terminal Information about Information about Addressingan uplink path a downlink path information corresponding tocorresponding to of the fifth a fifth terminal the fifth terminalterminal Information about Information about Addressing an uplink path adownlink path information corresponding to corresponding to of the sixtha sixth terminal the sixth terminal terminal . . . . . . . . . bInformation about Information about Addressing an uplink path a downlinkpath information corresponding to corresponding to of the seventh aseventh terminal the seventh terminal terminal Information aboutInformation about Addressing an uplink path a downlink path informationcorresponding to corresponding to of the eighth an eighth terminal theeighth terminal terminal Information about Information about Addressingan uplink path a downlink path information corresponding tocorresponding to of the ninth a ninth terminal the ninth terminalterminal . . . . . . . . . . . . . . . . . . . . .

The foregoing correspondences may be combined or simplified in anothermanner. This is not specifically limited in this embodiment of thisapplication. In addition, the foregoing correspondences may berepresented in a form of tables, and may be alternatively represented inanother manner, for example, in a form of text or session context. Thisis not specifically limited in this embodiment of this application.

Optionally, using an example in which the identifier of the MLAN towhich the first terminal subscribes is the same as the identifier of theMLAN to which the second terminal subscribes, and the first terminalsends a data packet 1 to the second terminal, the data transmissionmethod provided in this embodiment of this application further includesthe following steps S410 to S413.

S410. The first terminal sends the data packet 1 to the UPF entitythrough the uplink path corresponding to the first terminal, so that theUPF entity receives the data packet 1 from the first terminal throughthe uplink path corresponding to the first terminal. The data packet 1carries addressing information of the second terminal, and theaddressing information of the second terminal is used as destinationaddressing information.

Optionally, the data packet 1 may further carry the addressinginformation of the first terminal as source addressing information. Thisis not specifically limited in this embodiment of this application.

S411. The UPF entity determines, based on the information about theuplink path corresponding to the first terminal, the identifier of theMLAN to which the first terminal subscribes.

In some embodiments, the UPF entity may determine, based on theinformation about the uplink path corresponding to the first terminaland the correspondence 1, the identifier of the MLAN to which the firstterminal subscribes.

For example, the UPF entity may query Table 1, Table 5, Table 7, orTable 8 based on the information about the uplink path corresponding tothe first terminal, to obtain the identifier of the MLAN to which thefirst terminal subscribes.

S412. The UPF entity determines, based on the identifier of the MLAN towhich the first terminal subscribes and the addressing information ofthe second terminal, a downlink path corresponding to the secondterminal.

In some embodiments, the UPF entity may determine, based on theidentifier of the MLAN to which the first terminal subscribes, theaddressing information of the second terminal, and the correspondence 4,the downlink path corresponding to the second terminal.

For example, the UPF entity may query Table 4, Table 6, Table 7, orTable 8 based on the identifier of the MLAN to which the first terminalsubscribes and the addressing information of the second terminal, toobtain information about the downlink path corresponding to the secondterminal, and further determine the downlink path corresponding to thesecond terminal.

Optionally, if the UPF entity cannot determine the information about thedownlink path corresponding to the second terminal, for example, thequery fails, the data packet 1 is discarded. This is not specificallylimited in this embodiment of this application.

S413. The UPF entity sends the data packet 1 to the second terminalthrough the downlink path corresponding to the second terminal.

Optionally, in this embodiment of this application, the destinationaddressing information carried in the data packet 1 may alternatively beinformation about a broadcast address. After detecting that thedestination addressing information is information about a broadcastaddress, the UPF entity or the SMF entity may replace the broadcastaddress with addressing information of all terminals other than thefirst terminal in the MLAN to which the first terminal subscribes,determine, in the foregoing manner based on the identifier of the MLANand addressing information of the corresponding terminal, a downlinkpath corresponding to the corresponding terminal, and further send thedata packet 1 to the corresponding terminal through the downlink pathcorresponding to the corresponding terminal. This is not specificallylimited in this embodiment of this application.

Alternatively, optionally, using an example in which the identifier ofthe MLAN to which the first terminal subscribes is the same as theidentifier of the MLAN to which the second terminal subscribes, and thesecond terminal sends a data packet 2 to the first terminal, the datatransmission method provided in this embodiment of this applicationfurther includes the following steps S414 to S417.

S414. The second terminal sends the data packet 2 to the UPF entitythrough the uplink path corresponding to the second terminal, so thatthe UPF entity receives the data packet 2 from the second terminalthrough the uplink path corresponding to the second terminal. The datapacket 2 carries the addressing information of the first terminal, andthe addressing information of the first terminal is used as destinationaddressing information.

Optionally, the data packet 2 may further carry the addressinginformation of the second terminal as source addressing information.This is not specifically limited in this embodiment of this application.

S415. The UPF entity determines, based on information about the uplinkpath corresponding to the second terminal, the identifier of the MLAN towhich the second terminal subscribes.

In some embodiments, the UPF entity may determine, based on theinformation about the uplink path corresponding to the second terminaland the correspondence 3, the identifier of the MLAN to which the secondterminal subscribes.

For example, the UPF entity may query Table 3, Table 6, Table 7, orTable 8 based on the information about the uplink path corresponding tothe second terminal, to obtain the identifier of the MLAN to which thesecond terminal subscribes.

S416. The UPF entity determines, based on the identifier of the MLAN towhich the second terminal subscribes and the addressing information ofthe first terminal, the downlink path corresponding to the firstterminal.

In some embodiments, the UPF entity may determine, based on theidentifier of the MLAN to which the second terminal subscribes, theaddressing information of the first terminal, and the correspondence 2,the downlink path corresponding to the first terminal.

For example, the UPF entity may query Table 2, Table 5, Table 7, orTable 8 based on the identifier of the MLAN to which the second terminalsubscribes and the addressing information of the first terminal, toobtain the information about the downlink path corresponding to thefirst terminal, and further determine the downlink path corresponding tothe first terminal.

Optionally, if the UPF entity cannot determine the information about thedownlink path corresponding to the first terminal, for example, thequery fails, the data packet 2 is discarded. This is not specificallylimited in this embodiment of this application.

S417. The UPF entity sends the data packet 2 to the first terminalthrough the downlink path corresponding to the first terminal.

Optionally, in this embodiment of this application, the destinationaddressing information carried in the data packet 2 may alternatively beinformation about a broadcast address. After detecting that thedestination addressing information is information about a broadcastaddress, the UPF entity or the SMF entity may replace the broadcastaddress with addressing information of all terminals other than thesecond terminal in the MLAN to which the second terminal subscribes, anddetermine, in the foregoing manner based on the identifier of the MLANand addressing information of the corresponding terminal, a downlinkpath corresponding to the corresponding terminal, and further send thedata packet 2 to the corresponding terminal through the downlink pathcorresponding to the corresponding terminal. This is not specificallylimited in this embodiment of this application.

According to the data transmission method provided in this embodiment ofthis application, after receiving the data packet from the firstterminal through the uplink path corresponding to the first terminal,the UPF entity can determine, based on the information about the uplinkpath corresponding to the first terminal and the addressing informationof the second terminal, the downlink path corresponding to the secondterminal, and can further send the data packet to the second terminalthrough the downlink path corresponding to the second terminal;alternatively, after receiving the data packet from the second terminalthrough the uplink path corresponding to the second terminal, the UPFentity can determine, based on the information about the uplink pathcorresponding to the second terminal and the addressing information ofthe first terminal, the downlink path corresponding to the firstterminal, and can further send the data packet to the first terminalthrough the downlink path corresponding to the first terminal.Therefore, when two terminals correspond to a same UPF entity, the twoterminals can locally interact with each other. For example, when twoterminals that access a same MLAN correspond to a same UPF entity, thetwo terminals can locally interact with each other in the MLAN.

An action of the UPF entity in the foregoing steps S401 a to S417 may beperformed by the processor 301 in the communications device 300 shown inFIG. 3 invoking application program code stored in the memory 303. Nolimitation is imposed on thereto in this embodiment of this application.

Optionally, assuming that the data transmission system shown in FIG. 1is applied to the 5G network shown in FIG. 2 , a data transmissionmethod provided in an embodiment of this application may be shown inFIG. 5A, FIG. 5B, FIG. 5C, and FIG. 5D, and includes the followingsteps.

Steps S501 a to S504 a are similar to steps S401 a to S404 a. Fordetails, refer to the embodiment shown in FIG. 4A, FIG. 4B, and FIG. 4C.Details are not described herein again.

S505 a. The SMF entity sends an N4 session message to the UPF entity, sothat the UPF entity receives the N4 session message from the SMF entity,where the N4 session message carries the identifier of the MLAN to whichthe first terminal subscribes.

Steps S506 a to S508 a are similar to steps S401 a to S408 a. Fordetails, refer to the embodiment shown in FIG. 4A, FIG. 4B, and FIG. 4C.Details are not described herein again.

S509 a. The UPF entity establishes a correspondence between theidentifier of the MLAN to which the first terminal subscribes, theinformation about the uplink path corresponding to the first terminal,and the information about the downlink path corresponding to the firstterminal.

For ease of description, in this embodiment of this application, thecorrespondence between the identifier of the MLAN to which the firstterminal subscribes, the information about the uplink path correspondingto the first terminal, and the information about the downlink pathcorresponding to the first terminal may be recorded as a correspondence5. This is described herein for once, and details are not describedbelow again. The correspondence 5 may be shown in Table 9.

TABLE 9 Identifier of an MLAN Information about Information about towhich a first a downlink path an uplink path terminal subscribescorresponding corresponding to the first terminal to the first terminal

Optionally, the correspondence 5 may be alternatively sent to the UPFentity after being created by the SMF entity. This is not specificallylimited in this embodiment of this application.

S510 a. The first terminal sends a dynamic host configuration protocol(DHCP) request to the UPF entity through the uplink path correspondingto the first terminal, so that the UPF entity receives the DHCP requestfrom the first terminal, where the DHCP request carries a MAC address ofthe first terminal.

Optionally, if a DHCP server is integrated into the UPF entity, afterreceiving the DHCP request from the first terminal, the UPF entity mayparse out the MAC address of the first terminal in the DHCP request, andallocate an IP address for the first terminal, and subsequent steps S511a and S512 a are performed.

S511 a. The UPF entity sends a DHCP response to the first terminal, sothat the first terminal receives the DHCP response from the UPF entity,where the DHCP response carries the IP address of the first terminal.

S512 a. The UPF entity establishes, based on the correspondence 5 andaddressing information of the first terminal, a correspondence betweenthe identifier of the MLAN to which the first terminal subscribes, theinformation about the downlink path corresponding to the first terminal,and the addressing information of the first terminal.

Optionally, in this embodiment of this application, the addressinginformation of the first terminal may be the IP address or the MACaddress of the first terminal. This is not specifically limited in thisembodiment of this application.

Optionally, in this embodiment of this application, if a DHCP server isnot integrated into the UPF entity, after receiving the DHCP requestfrom the first terminal, the UPF entity may send the DHCP request to adevice into which the DHCP server is integrated, and the device intowhich the DHCP server is integrated parses out the MAC address of thefirst terminal in the DHCP request, allocates an IP address for thefirst terminal, and then sends the addressing information of the firstterminal to the UPF entity, and the UPF entity establishes, based on thecorrespondence 5 and the addressing information of the first terminal,the correspondence between the identifier of the MLAN to which the firstterminal subscribes, the information about the downlink pathcorresponding to the first terminal, and the addressing information ofthe first terminal. This is not specifically limited in this embodimentof this application.

For example, assuming that a DHCP server is integrated into the SMFentity, after receiving the DHCP request from the first terminal, theUPF entity may send the DHCP request to the SMF entity, the SMF entityparses out the MAC address of the first terminal in the DHCP request,allocates an IP address for the first terminal, and sends the addressinginformation of the first terminal to the UPF entity, and the UPF entityestablishes, based on the correspondence 5 and the addressinginformation of the first terminal, the correspondence between theidentifier of the MLAN to which the first terminal subscribes, theinformation about the downlink path corresponding to the first terminal,and the addressing information of the first terminal. The SMF entity mayalternatively send a DHCP response to the first terminal through the UPFentity, where the DHCP response carries the IP address of the firstterminal. This is not specifically limited in this embodiment of thisapplication.

For related description of the correspondence between the identifier ofthe MLAN to which the first terminal subscribes, the information aboutthe downlink path corresponding to the first terminal, and theaddressing information of the first terminal, refer to the descriptionof the correspondence 2 in the embodiment shown in FIG. 4A, FIG. 4B, andFIG. 4C. Details are not described herein again.

Steps S501 b to S512 b are similar to steps S501 a to S512 a. Adifference lies in that in steps S501 b to S512 b, the first terminal insteps S501 a to S512 a is replaced with a second terminal, and the firstAN device is replaced with a second AN device. For details, refer tosteps S501 a to S512 a. Details are not described herein again.

In step S509 b, a correspondence that is between an identifier of anMLAN to which the second terminal subscribes, information about anuplink path corresponding to the second terminal, and information abouta downlink path corresponding to the second terminal and that isestablished by the UPF entity may be recorded as a correspondence 6, andis shown in Table 10.

TABLE 10 Identifier of an MLAN Information about Information about towhich a second a downlink path an uplink path terminal subscribescorresponding corresponding to the second terminal to the secondterminal

Steps S513 to S520 are similar to steps S411 to S418. For details, referto the embodiment shown in FIG. 4A, FIG. 4B, and FIG. 4C. Details arenot described herein again.

A difference between this embodiment and the embodiment shown in FIG.4A, FIG. 4B, and FIG. 4C lies in that in the embodiment shown in FIG.4A, FIG. 4B, and FIG. 4C, the addressing information of the firstterminal in the correspondence 2 is obtained during a process in whichthe first terminal establishes an MLAN session. The addressinginformation of the second terminal in the correspondence 4 is obtainedduring a process in which an MLAN session is established for the secondterminal. However, in the embodiment shown in FIG. 5A, FIG. 5B, FIG. 5C,and FIG. 5D, the addressing information of the first terminal in thecorrespondence 2 is obtained during a DHCP procedure initiated by thefirst terminal, and the addressing information of the second terminal inthe correspondence 4 is obtained during a DHCP procedure initiated bythe second terminal.

According to the data transmission method provided in this embodiment ofthis application, after receiving the data packet from the firstterminal through the uplink path corresponding to the first terminal,the UPF entity can determine, based on the information about the uplinkpath corresponding to the first terminal and the addressing informationof the second terminal, the downlink path corresponding to the secondterminal, and can further send the data packet to the second terminalthrough the downlink path corresponding to the second terminal;alternatively, after receiving the data packet from the second terminalthrough the uplink path corresponding to the second terminal, the UPFentity can determine, based on the information about the uplink pathcorresponding to the second terminal and the addressing information ofthe first terminal, the downlink path corresponding to the firstterminal, and can further send the data packet to the first terminalthrough the downlink path corresponding to the first terminal.Therefore, when two terminals correspond to a same UPF entity, the twoterminals can locally interact with each other. For example, when twoterminals that access a same MLAN correspond to a same UPF entity, thetwo terminals can locally interact with each other in the MLAN.

An action of the UPF entity in the foregoing steps S501 a to S520 may beperformed by the processor 301 in the communications device 300 shown inFIG. 3 invoking application program code stored in the memory 303. Nolimitation is imposed thereto in this embodiment of this application.

The following is described by using an example in which an identifier ofan MLAN to which a first terminal subscribes is configured on the firstterminal. FIG. 6 is a schematic flowchart of a configuration process ofan identifier of an MLAN, and the procedure includes the followingsteps.

S601. When the first terminal subscribes an MLAN service, a UDM entitystores subscription information of the MLAN corresponding to the firstterminal, where the subscription information of the MLAN correspondingto the first terminal includes the identifier of the MLAN to which thefirst terminal subscribes.

Optionally, if the identifier of the MLAN to which the first terminalsubscribes corresponds to a specific service scope, the subscriptioninformation of the MLAN of the first terminal may further includeinformation about a specific service area corresponding to theidentifier of the MLAN to which the first terminal subscribes.

The information about the specific service area corresponding to theidentifier of the MLAN to which the first terminal subscribes may bealternatively configured on another network device. For example, theinformation about the specific service area corresponding to theidentifier of the MLAN to which the first terminal subscribes isconfigured on one or more devices of a PCF entity, an AMF entity, and anSMF entity, so that when the first terminal initiates an MLAN sessionestablishment procedure, these network devices can determine, based on acurrent location of the first terminal and the information about thespecific service area corresponding to the identifier of the MLAN towhich the first terminal subscribes, whether the first terminal is inthe specific service area corresponding to the identifier of the MLAN towhich the first terminal subscribes. This is not specifically limited inthis embodiment of this application.

S602. The first terminal sends a registration or re-registration requestto an AMF entity, so that the AMF entity receives the registration orre-registration request from the first terminal.

S603. The AMF entity obtains, from the UDM entity, the identifier of theMLAN to which the first terminal subscribes.

Optionally, if the identifier of the MLAN to which the first terminalsubscribes corresponds the specific service scope, and the informationabout the specific service area corresponding to the identifier of theMLAN to which the first terminal subscribes is not configured on the AMFentity, the AMF entity further obtains, from a device on which theinformation about the specific service area corresponding to theidentifier of the MLAN to which the first terminal subscribes isconfigured, for example, the UDM entity, the PCF entity, or the SMFentity, the information about the specific service area corresponding tothe identifier of the MLAN to which the first terminal subscribes. Thisis not specifically limited in this embodiment of this application.

S604. The AMF entity sends a registration response to the firstterminal, so that the first terminal receives the registration responsefrom the AMF entity, where the registration response carries theidentifier of the MLAN to which the first terminal subscribes.

Optionally, in this embodiment of this application, after the AMF entityobtains, from the UDM entity, the identifier of the MLAN to which thefirst terminal subscribes, if the identifier of the MLAN to which thefirst terminal subscribes corresponds to the specific service scope, theAMF entity needs to determine, based on information about a currentregistration area of the first terminal and the information about thespecific service area corresponding to the identifier of the MLAN towhich the first terminal subscribes, whether the current registrationarea of the first terminal overlaps the specific service areacorresponding to the identifier of the MLAN to which the first terminalsubscribes; if the current registration area of the first terminaloverlaps the specific service area corresponding to the identifier ofthe MLAN to which the first terminal subscribes, the AMF entity sends aregistration response to the first terminal, where the registrationresponse carries the identifier of the MLAN to which the first terminalsubscribes. Optionally, in this case, the registration response mayfurther include the information about the specific service areacorresponding to the identifier of the MLAN to which the first terminalsubscribes, so that the first terminal can initiate, based on theinformation about the specific service area corresponding to theidentifier of the MLAN to which the first terminal subscribes, an MLANsession establishment procedure in the specific service areacorresponding to the identifier of the MLAN to which the first terminalsubscribes. This is not specifically limited in this embodiment of thisapplication.

In this case, the first terminal can obtain the identifier of the MLANto which the first terminal subscribes, and can subsequently initiate anMLAN session establishment procedure based on the identifier of the MLANto which the first terminal subscribes. For details, refer to theembodiment shown in FIG. 4A, FIG. 4B, and FIG. 4C or FIG. 5A, FIG. 5B,FIG. 5C, and FIG. 5D. Details are not described herein again.

In addition, for a procedure in which an identifier of an MLAN to whicha second terminal subscribes is configured on the second terminal, referto the foregoing procedure in which the identifier of the MLAN to whichthe first terminal subscribes is configured on the first terminal.Details are not described herein again.

Optionally, assuming that the data transmission system shown in FIG. 9is applied to the 5G network shown in FIG. 2 , a data transmissionmethod provided in an embodiment of this application may be shown inFIG. 10A and FIG. 10B, and includes the following steps.

S1001. A terminal sends a non-access stratum (NAS) message to an AMFnetwork element through an access device, so that the AMF networkelement receives the NAS message from the terminal.

The NAS message includes a session establishment request, the sessionestablishment request is used to request to establish a session for theterminal, and the session may be, for example, a PDU session. This isdescribed herein for once, and details are not described below again.

In a possible implementation, the NAS message may include an identifierof an MLAN associated with the session for the terminal. The“association” herein may be alternatively understood as “belonging” or“corresponding”, for a purpose of sending data of the terminal into theMLAN by using the session.

In another possible implementation, the session establishment request inthe NAS message may include the identifier of the MLAN associated withthe session for the terminal. This is not specifically limited in thisembodiment of this application.

The identifier of the MLAN in this embodiment of this application isused to indicate a 5G MLAN associated with the session, or may beconsidered as identifying a subscriber group using an MLAN service. Ifthe terminal subscribes to a specific MLAN, the terminal can use aservice provided by the MLAN. This is described herein for once, anddetails are not described below again.

In this embodiment of this application, the identifier of the MLAN maybe a data network name (DNN), a fully qualified domain name (FQDN), acharacter string, a sequence number, an internal group identifier, anexternal group identifier, or the like. This is not specifically limitedin this embodiment of this application.

In addition, the NAS message in this embodiment of this application mayfurther include an identifier of the session for the terminal. Fordetails, refer to an existing implementation. Details are not describedherein.

S1002. An AMF network element sends an N11 message 1 to the SMF networkelement, so that the SMF network element receives the N11 message 1 fromthe AMF network element.

The N11 message 1 includes an identifier of the terminal and the sessionestablishment request. The identifier of the terminal is determinedafter the AMF network element receives the NAS message from theterminal, and is used to indicate a terminal that initiates the NASmessage. For details, refer to an existing implementation. Details arenot described herein.

In addition, when the session establishment request does not include anidentifier of an MLAN, the N11 message 1 further includes the identifierof the MLAN in the NAS message. This is described herein for once, anddetails are not described below again.

In addition, if the NAS message in step S1001 further includes theidentifier of the session for the terminal, the N11 message 1 mayfurther include the identifier of the session for the terminal. Fordetails, refer to an existing implementation. Details are not describedherein.

Optionally, if the NAS message in step S1001 includes the identifier ofthe MLAN, after receiving the identifier of the MLAN, the AMF networkelement may verify whether the terminal subscribes to an MLAN orsubscriber group corresponding to the identifier of the MLAN, and mayselect a corresponding SMF network element based on the identifier ofthe MLAN. This is not specifically limited in this embodiment of thisapplication.

S1003. The SMF network element determines an uplink data forwarding rulebased on the identifier of the MLAN, where the uplink data forwardingrule includes a label of the MLAN and information about an uplink pathcorresponding to the session.

The identifier of the MLAN may be obtained in the N11 message 1, or maybe obtained in the session establishment request in the N11 message 1.This is not specifically limited in this embodiment of this application.

Optionally, the label of the MLAN in this embodiment of this applicationmay be, for example, a network instance identifier, a virtual local areanetwork (VLAN) identifier (VID), an identifier of an MLAN, or the like.This is not specifically limited in this embodiment of this application.The label of the MLAN may be used to identify an instance of the MLAN,or may be used to recognize, encapsulate, or identify data in the MLAN.The label of the MLAN may exist in tunnel information, terminal data,configuration data, or the like, and is mainly used to isolatecommunication between MLANs.

Optionally, in this embodiment of this application, that the SMF networkelement determines the uplink data forwarding rule based on theidentifier of the MLAN may include that the SMF network element obtainsthe label of the MLAN based on the identifier of the MLAN; allocates,for the terminal, the information about the uplink path corresponding tothe session; and generates the uplink data forwarding rule based on thelabel of the MLAN and the information about the uplink pathcorresponding to the session.

Optionally, in this embodiment of this application, if the identifier ofthe MLAN is used to identify a subscriber group using an MLAN service,the label of the MLAN may be a label of an MLAN to which a terminal inthe subscriber group subscribes. This is described herein for once, anddetails are not described below again.

Optionally, in this embodiment of this application, the informationabout the uplink path corresponding to the session may be, for example,a tunnel identifier of a UPF network element that is allocated for thesession, where the tunnel identifier may be, for example, a TEID. Fordetails, refer to the description of the beginning part of thedescription of embodiments. Details are not described herein again.

Optionally, in this embodiment of this application, the SMF networkelement may obtain the label of the MLAN based on the identifier of theMLAN in the following manner.

In a possible implementation, the SMF network element may obtainsubscription data of the MLAN of the terminal from a UDM network elementbased on the identifier of the MLAN, where the subscription dataincludes the label of the MLAN. Optionally, the subscription data mayfurther include addressing information of the terminal and a quality ofservice (QoS) parameter related to the MLAN, for example, asession-aggregate maximum bit rate (AMBR), a 5G QoS indicator (5QI), orthe like. This is not specifically limited in this embodiment of thisapplication. In this embodiment of this application, the addressinginformation of the terminal may be allocated by the SMF network element,or obtained from a third party, for example, a DHCP server, or an MLANaddress management function entity. For details, refer to the foregoingmethod embodiment. This is not specifically limited in this embodimentof this application.

In another possible implementation, the SMF network element may obtain,based on the identifier of the MLAN, authentication data of the MLAN ofthe terminal from another network element, for example, a managemententity of the MLAN or a datanetwork-authentication-authorization-accounting (DN-AAA) server, wherethe authentication data includes the label of the MLAN. This is notspecifically limited in this embodiment of this application.

In another possible implementation, the SMF network element may allocatethe label of the MLAN for the session based on the identifier of theMLAN; alternatively, the SMF network element pre-stores a correspondencebetween an identifier of an MLAN and a label of the MLAN, so that theSMF network element can determine the label of the MLAN based on theidentifier of the MLAN and the correspondence. This is not specificallylimited in this embodiment of this application.

In another possible implementation, the SMF network element maydetermine the identifier of the MLAN as the label of the MLAN. This isnot specifically limited in this embodiment of this application.

Optionally, in this embodiment of this application, the SMF networkelement may alternatively obtain policy data of the terminal from a PCFnetwork element based on the identifier of the MLAN, where the policydata may include a filter, an adjusted QoS parameter, or the like. Thefilter may be alternatively generated by the SMF network element basedon information such as an address of the terminal, a local policy, andthe like. This is not specifically limited in this embodiment of thisapplication.

Optionally, in this embodiment of this application, the SMF networkelement may alternatively select a UPF network element based on theidentifier of the MLAN. This is not specifically limited in thisembodiment of this application.

S1004. The SMF network element sends a session creating request to theUPF network element, so that the UPF network element receives thesession creating request from the SMF network element.

The session creating request includes the uplink data forwarding rule,and the uplink data forwarding rule is used to instruct the UPF networkelement to forward, by using routing information corresponding to thelabel of the MLAN, uplink data received on the uplink path.

Optionally, in this embodiment of this application, the routinginformation corresponding to the label of the MLAN may specificallyinclude a destination address and a next-hop path. This is notspecifically limited in this embodiment of this application.

Optionally, in this embodiment of this application, the session creatingrequest may further include an N4 session identifier obtained throughmapping of the identifier of the session. For details, refer to anexisting implementation. Details are not described herein.

S1005. The UPF network element forwards, based on the uplink dataforwarding rule by using the routing information corresponding to thelabel of the MLAN, the uplink data received on the uplink path.

For example, if the information about the uplink path corresponding tothe session is a TEID 1, and the label of the MLAN is a label 1, the UPFnetwork element may learn of, based on the TEID 1, a specific session towhich received data belongs, and a next-hop path of the data of thesession is determined by using routing information related to thelabel 1. If assuming that a current terminal is a terminal 1, a targetaddress of the data of the session is an address of a terminal 2, and anext-hop path in the routing information related to the label 1 is apath 1, the UPF network element may forward, by using the path 1, uplinkdata that is received on the uplink path corresponding to the TEID 1 andwhose destination address is the address of the terminal 2.Alternatively, assuming that when a current terminal is a terminal 1, atarget address of data of the session is an address of a terminal 3, anda next-hop path in the routing information related to the label 1 is apath 2, the UPF network element may forward, by using the path 2, uplinkdata that is received on the uplink path corresponding to the TEID 1 andwhose destination address is the address of the terminal 3, and so on.

S1006. The SMF network element sends an N11 message 2 to the AMF networkelement, so that the AMF network element receives the N11 message 2 fromthe SMF network element.

S1007. The AMF network element sends an N2 message 1 to the accessdevice, so that the access device receives the N2 message 1 from the AMFnetwork element.

S1008. The access device establishes a Radio Resource Control (RRC)connection to the terminal.

S1009. The access device sends an N2 message 2 to the AMF networkelement, so that the AMF network element receives the N2 message 2 fromthe access device.

S1010. The AMF network element sends an N11 message 3 to the SMF networkelement, so that the SMF network element receives the N11 message 3 fromthe AMF network element.

Optionally, steps S1006 to S1010 are performed, so that the QoSparameter can be configured on the terminal, and the information aboutthe uplink path is configured on the access device, and information thatis about a downlink path and that is allocated by the access device forthe session may be obtained at the same time, where the informationabout the downlink path may include, for example, a tunnel identifier ofthe access device that is allocated for the session, the tunnelidentifier may be, for example, a TEID. For details, refer to thedescription of the beginning part of the description of embodiments.Details are not described herein again. For an implementation related tothe foregoing steps S1006 to S1010, refer to an existing implementation.Details are not described herein again.

Further, the data transmission method provided in this embodiment ofthis application may further include the following steps S1011 a toS1013 a, or the following steps S1011 b to S1013 b.

Steps S1011 a to S1013 a may include:

S1011 a. The SMF network element obtains a downlink data forwarding rule1, where the downlink data forwarding rule 1 includes the label of theMLAN and the addressing information of the terminal.

The label of the MLAN and the addressing information of the terminal maybe obtained in the foregoing step S1003. Details are not describedherein again.

S1012 a. The SMF network element sends a session modification request 1to the UPF network element, so that the UPF network element receives thesession modification request 1 from the SMF network element.

The session modification request 1 includes the downlink data forwardingrule 1, the downlink data forwarding rule 1 is used to instruct the UPFnetwork element to forward, by using the routing informationcorresponding to the label of the MLAN, downlink data to be sent to anaddress corresponding to the addressing information of the terminal.

Optionally, in this embodiment of this application, the sessionmodification request 1 may further include an N4 session identifierobtained through mapping of the identifier of the session. For details,refer to an existing implementation. Details are not described hereinagain.

S1013 a. The UPF network element forwards, based on the downlink dataforwarding rule 1 by using the routing information corresponding to thelabel of the MLAN, the downlink data to be sent to the addresscorresponding to the addressing information of the terminal.

For example, if the addressing information of the terminal is an address1, the label of the MLAN is a label 2, the UPF network element may learnof, based on the addressing information of the terminal, a specificsession to which received data belongs, where a next-hop path of thedata of the session is determined by using routing information relatedto the label 2. For example, assuming that a current terminal is aterminal 1, the addressing information is an address 1, and a next-hoppath in the routing information related to the label 2 is a path 3, theUPF network element may forward, by using the path 3, downlink data tobe sent to a destination address of the terminal 1, namely the address1.

Steps S1011 b to S1013 b may include:

S1011 b. The SMF network element obtains a downlink data forwarding rule2, where the downlink data forwarding rule 2 includes the label of theMLAN, the addressing information of the terminal, and information abouta downlink path corresponding to the session.

The label of the MLAN and the addressing information of the terminal maybe obtained in the foregoing step S1003. The information about thedownlink path corresponding to the session may be sent to the SMFnetwork element in steps S1009 and S1010. Details are not describedherein again.

S1012 b. The SMF network element sends a session modification request 2to the UPF network element, so that the UPF network element receives thesession modification request 2 from the SMF network element.

The session modification request 2 includes the downlink data forwardingrule 2, the downlink data forwarding rule 2 is used to instruct the UPFnetwork element to update the routing information corresponding to thelabel of the MLAN, and forward, by using the downlink path in updatedrouting information corresponding to the label of the MLAN, downlinkdata to be sent to an address corresponding to the addressinginformation of the terminal.

Optionally, in this embodiment of this application, the sessionmodification request 2 may further include an N4 session identifierobtained through mapping of the identifier of the session. For details,refer to an existing implementation. Details are not described hereinagain.

S1013 b. The UPF network element updates, based on the downlink dataforwarding rule 2, the routing information corresponding to the label ofthe MLAN, and forwards, by using the downlink path in the updatedrouting information corresponding to the label of the MLAN, the downlinkdata to be sent to the address corresponding to the addressinginformation of the terminal.

In this embodiment of this application, the updated routing informationcorresponding to the label of the MLAN may specifically include that theinformation about the downlink path corresponding to the session isadded to the routing information corresponding to the label of the MLAN,so that the UPF network element can forward, by using the downlink pathin the updated routing information corresponding to the label of theMLAN, the downlink data to be sent to the address corresponding to theaddressing information of the terminal. For a related example in whichthe UPF network element forwards, by using the downlink path in theupdated routing information corresponding to the label of the MLAN, thedownlink data to be sent to the address corresponding to the addressinginformation of the terminal, refer to step S1013 a. Details are notdescribed herein again.

According to the data transmission method provided in this embodiment ofthis application, when two terminals correspond to a same user planefunction network element, the two terminals can locally interact witheach other. For related analysis on technical effects, refer to the datatransmission system part shown in FIG. 9 . Details are not describedherein again.

An action of the SMF network element in the foregoing steps S1001 a toS1013 a, in the foregoing steps S1001 to S1013 b may be performed by theprocessor 301 in the communications device 300 shown in FIG. 3 invokingapplication program code stored in the memory 303. No limitation isimposed thereto in this embodiment of this application.

The foregoing mainly describes the solutions provided in the embodimentsof this application from a perspective of interaction between networkelements. It may be understood that, to implement the foregoingfunctions, the user plane function entity and the mobility managemententity include a corresponding hardware structure and/or software modulefor performing each function. A person skilled in the art should readilyappreciate that this application can be implemented in a form ofhardware or in a form of a combination of hardware and computer softwarewith reference to units and algorithm steps of examples described in theembodiments disclosed in this specification. Whether a function isperformed by hardware or hardware driven by computer software depends onparticular applications and design constraints of the technicalsolutions. A person skilled in the art may use different methods toimplement the described functions for each particular application, butit should not be considered that the implementation goes beyond thescope of this application.

Division of function modules may be performed on the user plane functionentity and the mobility management entity according to the foregoingmethod examples in the embodiments of this application. For example,each of the function modules may be divided in correspondence to eachfunction, or two or more functions may be integrated into one processingmodule. The integrated module may be implemented in a form of hardware,or may be implemented in a form of a software function module. It shouldbe noted that the division of the modules in the embodiments of thisapplication is an example, and is merely logical function division, andthere may be another division manner during actual implementation.

For example, in a case in which the function modules are divided in anintegrated manner, FIG. 7 shows a schematic structural diagram of a userplane function entity 70 in the foregoing embodiments. The user planefunction entity 70 includes a transceiver module 701 and a processingmodule 702. The transceiver module 701 is configured to receive a datapacket from a first terminal through an uplink path corresponding to thefirst terminal, where the data packet carries addressing information ofa second terminal. The processing module 702 is configured to determine,based on information about the uplink path corresponding to the firstterminal and the addressing information of the second terminal, adownlink path corresponding to the second terminal. The transceivermodule 701 is further configured to send the data packet to the secondterminal through the downlink path corresponding to the second terminal.

Optionally, the processing module 702 is configured to: determine, basedon the information about the uplink path corresponding to the firstterminal, an identifier of an MLAN to which the first terminalsubscribes; and determine, based on the identifier of the MLAN and theaddressing information of the second terminal, the downlink pathcorresponding to the second terminal.

Optionally, that the processing module 702 determines, based oninformation about the uplink path corresponding to the first terminal,an identifier of an MLAN to which the first terminal subscribesincludes: determining, based on the information about the uplink pathcorresponding to the first terminal and a first correspondence, theidentifier of the MLAN to which the first terminal subscribes, where thefirst correspondence includes a correspondence between the informationabout the uplink path corresponding to the first terminal and theidentifier of the MLAN.

Optionally, that the processing module 702 determines, based on theidentifier of the MLAN and the addressing information of the secondterminal, the downlink path corresponding to the second terminalincludes: determining, based on the identifier of the MLAN, theaddressing information of the second terminal, and a secondcorrespondence, the downlink path corresponding to the second terminal,where the second correspondence includes a correspondence betweeninformation about the downlink path corresponding to the secondterminal, the addressing information of the second terminal, and theidentifier of the MLAN.

Optionally, the processing module 702 is further configured to obtainthe addressing information of the second terminal, where the addressinginformation of the second terminal includes an IP address of the secondterminal, or a MAC address of the second terminal.

Optionally, the addressing information of the second terminal includesthe IP address of the second terminal; and that the processing module702 obtains the addressing information of the second terminal includes:receiving the IP address of the second terminal from a sessionmanagement function entity, where the IP address of the second terminalis determined based on the identifier of the MLAN.

Optionally, the addressing information of the second terminal includesthe MAC address of the second terminal; and that the processing module702 obtains the addressing information of the second terminal includes:receiving the MAC address of the second terminal from the secondterminal during an MLAN session establishment process.

Optionally, the addressing information of the second terminal includesthe MAC address of the second terminal; and that the processing module702 obtains the addressing information of the second terminal includes:receiving a DHCP request from the second terminal through an uplink pathof the second terminal, where the DHCP request carries the MAC addressof the second terminal; sending the DHCP request to the sessionmanagement function entity; and receiving the MAC address of the secondterminal from the session management function entity.

Optionally, the addressing information of the second terminal includesthe MAC address of the second terminal; and that the processing module702 obtains the addressing information of the second terminal includes:receiving a DHCP request from the second terminal through an uplink pathof the second terminal, where the DHCP request carries the MAC addressof the second terminal; and parsing the DHCP request, to obtain the MACaddress of the second terminal.

Optionally, the processing module 702 is further configured to obtain anidentifier of an MLAN to which the second terminal subscribes and theinformation about the downlink path corresponding to the secondterminal; and the processing module 702 is further configured toestablish the second correspondence based on the identifier of the MLAN,the addressing information of the second terminal, and the informationabout the downlink path corresponding to the second terminal.

Optionally, the processing module 702 is further configured to: beforethe transceiver module 701 receives the DHCP request from the secondterminal through the uplink path corresponding to the second terminal,obtain the information about the uplink path corresponding to the secondterminal, the identifier of the MLAN to which the second terminalsubscribes, and the information about the downlink path corresponding tothe second terminal; the processing module 702 is further configured toestablish a third correspondence based on the information about theuplink path corresponding to the second terminal, the information aboutthe downlink path corresponding to the second terminal, and theidentifier of the MLAN, where the third correspondence includes acorrespondence between the information about the uplink pathcorresponding to the second terminal, the information about the downlinkpath corresponding to the second terminal, and the identifier of theMLAN; and the processing module 702 is further configured to: after thetransceiver module 701 receives the DHCP request from the secondterminal through the uplink path corresponding to the second terminal,establish the second correspondence based on the third correspondenceand the MAC address of the second terminal.

Optionally, the processing module 702 is further configured to obtainthe identifier of the MLAN to which the first terminal subscribes andthe information about the uplink path corresponding to the firstterminal; and the processing module 702 is further configured toestablish the first correspondence based on the identifier of the MLANand the information about the uplink path corresponding to the firstterminal.

Optionally, the information about the uplink path corresponding to thefirst terminal includes a tunnel identifier of a user plane functionentity that is allocated for the first terminal; and the informationabout the downlink path corresponding to the second terminal includes atunnel identifier of an access device that is allocated for the secondterminal.

Reference may be made to the function descriptions of the correspondingfunction modules for all related content of each step in the foregoingmethod embodiment. Details are not described herein again.

In this embodiment, the user plane function entity 70 is presented in aform of dividing the function modules in an integrated manner. Herein,the “module” may be an application-specific integrated circuit (ASIC), acircuit, a processor that executes one or more software or firmwareprograms and a memory, an integrated logic circuit, and/or anothercomponent that can provide the foregoing functions. In a simpleembodiment, a person skilled in the art may come up with an idea thatthe user plane function entity 70 may use a form shown in FIG. 3 .

The processor 301 in FIG. 3 invokes a computer execution instructionstored in the memory 303, so that the user plane function entity 70 isenabled to perform the data transmission method provided in theforegoing method embodiment.

Functions/implementation processes of the transceiver module 701 and theprocessing module 702 in FIG. 7 may be implemented by the processor 301in FIG. 3 invoking the computer execution instruction stored in thememory 303. Alternatively, functions/implementation processes of theprocessing module 702 in FIG. 7 may be implemented by the processor 301in FIG. 3 invoking the computer execution instruction stored in thememory 303. Functions/implementation processes of the transceiver module701 in FIG. 7 may be implemented by the communications interface 304 inFIG. 3 .

The user plane function entity in this embodiment of this applicationcan be configured to perform the foregoing data transmission method.Therefore, for technical effects that can be obtained by the user planefunction entity, refer to the foregoing method embodiment. Details arenot described herein again.

For example, in a case in which the function modules are divided in anintegrated manner, FIG. 8 shows a schematic structural diagram of amobility management entity 80 in the foregoing embodiment. The mobilitymanagement entity 80 includes a transceiver module 801 and a processingmodule 702. The transceiver module 801 is configured to receive aregistration or re-registration request from a terminal; the processingmodule 802 is configured to obtain, from a database entity, anidentifier of an MLAN to which the terminal subscribes; and thetransceiver module 801 is further configured to send the identifier ofthe MLAN to the terminal.

Optionally, the identifier of the MLAN is an identifier corresponding toa specific area; the transceiver module 801 is configured to: when theprocessing module 802 determines that a current registration area of theterminal overlaps the specific area, send the identifier of the MLAN tothe terminal.

Optionally, the transceiver module 801 is further configured to receivethe identifier of the MLAN from the terminal during an MLAN sessionestablishment process, where the identifier of the MLAN is used toestablish an MLAN session.

Reference may be made to the function descriptions of the correspondingfunction modules for all related content of each step in the foregoingmethod embodiment. Details are not described herein again.

In this embodiment, the mobility management entity 80 is presented in aform of dividing the function modules in an integrated manner. Herein,the “module” may be an application-specific integrated circuit (ASIC), acircuit, a processor that executes one or more software or firmwareprograms and a memory, an integrated logic circuit, and/or anothercomponent that can provide the foregoing functions. In a simpleembodiment, a person skilled in the art may come up with an idea thatthe mobility management entity 80 may use a form shown in FIG. 3 .

The processor 301 in FIG. 3 invokes a computer execution instructionstored in the memory 303, so that the mobility management entity 80 isenabled to perform the data transmission method in the foregoing methodembodiment.

Functions/implementation processes of the transceiver module 801 and theprocessing module 802 in FIG. 8 may be implemented by the processor 301in FIG. 3 invoking the computer execution instruction stored in thememory 303. Alternatively, functions/implementation processes of theprocessing module 802 in FIG. 8 may be implemented by the processor 301in FIG. 3 invoking the computer execution instruction stored in thememory 303. Functions/implementation processes of the transceiver module801 in FIG. 8 may be implemented by the communications interface 304 inFIG. 3 .

The mobility management entity in this embodiment of this applicationcan be configured to perform the foregoing data transmission method.Therefore, for technical effects that can be obtained by the mobilitymanagement entity, refer to the foregoing method embodiment. Details arenot described herein again.

In the foregoing embodiment, the user plane function entity 70 and themobility management entity 80 are presented in a form of dividing thefunction modules in an integrated manner. Division of function modulesmay be performed on the user plane function entity or the mobilitymanagement entity in correspondence to each function in this embodimentof this application. This is not specifically limited in this embodimentof this application.

Optionally, an embodiment of this application provides a chip system.The chip system includes a processor, where the processor is configuredto support a user plane function entity in implementing the foregoingdata transmission method, for example, determine, based on informationabout an uplink path corresponding to a first terminal and addressinginformation of a second terminal, a downlink path corresponding to thesecond terminal. In a possible design, the chip system further includesa memory. The memory is configured to store a program instruction anddata that are necessary for the user plane function entity. The chipsystem may include a chip, or may include a chip and another discretedevice. This is not specifically limited in this embodiment of thisapplication.

Optionally, an embodiment of this application provides a chip system.The chip system includes a processor, where the processor is configuredto support a mobility management entity in implementing the foregoingdata transmission method, for example, obtain an identifier of an MLANto which a terminal subscribes. In a possible design, the chip systemfurther includes a memory. The memory is configured to store a programinstruction and data that are necessary for the mobility managemententity. The chip system may include a chip, or may include a chip andanother discrete device. This is not specifically limited in thisembodiment of this application.

For example, in a case in which the function modules are divided in anintegrated manner, FIG. 11 shows a schematic structural diagram of asession management network element 110. The session management networkelement 110 includes a processing module 1101 and a transceiver module1102. The processing module 1101 is configured to obtain an identifierof an MLAN associated with a session of a terminal; the processingmodule 1101 is further configured to determine an uplink data forwardingrule based on the identifier of the MLAN, where the uplink dataforwarding rule includes a label of the MLAN and information about anuplink path corresponding to the session; and the transceiver module1102 is configured to send the uplink data forwarding rule to a userplane network element, where the uplink data forwarding rule is used toinstruct the user plane network element to forward, by using routinginformation corresponding to the label of the MLAN, uplink data receivedon the uplink path.

Optionally, that the processing module 1101 is configured to obtain anidentifier of an MLAN associated with a session of a terminal means thatthe processing module 1101 is configured to receive a sessionestablishment request from the terminal, where the session establishmentrequest includes the identifier of the MLAN; or the session managementnetwork element receives a request message from a mobility managementnetwork element, where the request message includes the identifier ofthe MLAN.

Optionally, that the processing module 1101 is configured to determinean uplink data forwarding rule based on the identifier of the MLAN meansthat the processing module 1101 is configured to obtain the label of theMLAN based on the identifier of the MLAN; and generate the uplink dataforwarding rule based on the label of the MLAN and the information thatis about the uplink path corresponding to the session and that isallocated for the terminal.

Optionally, that the processing module 1101 is configured to obtain thelabel of the MLAN based on the identifier of the MLAN means that theprocessing module 1101 is configured to obtain, based on the identifierof the MLAN, subscription data of the MLAN of the terminal, where thesubscription data includes the label of the MLAN; or obtainauthentication data of the MLAN of the terminal based on the identifierof the MLAN, where the authentication data includes the label of theMLAN; or allocate the label of the MLAN based on the identifier of theMLAN; or determine the identifier of the MLAN as the label of the MLAN.

Optionally, the processing module 1101 is further configured to obtain adownlink data forwarding rule, where the downlink data forwarding ruleincludes the label of the MLAN and addressing information of theterminal; the transceiver module 1102 is further configured to send thedownlink data forwarding rule to the user plane network element, wherethe downlink data forwarding rule is used to instruct the user planenetwork element to forward, by using routing information correspondingto the label of the MLAN, downlink data to be sent to an addresscorresponding to the addressing information of the terminal.

Optionally, the processing module 1101 is further configured to obtain adownlink data forwarding rule, where the downlink data forwarding ruleincludes the label of the MLAN, addressing information of the terminal,and information about a downlink path corresponding to the session; thetransceiver module 1102 is further configured to send the downlink dataforwarding rule to the user plane network element, where the downlinkdata forwarding rule is used to instruct the user plane network elementto update the routing information corresponding to the label of theMLAN, and forward, by using the downlink path in updated routinginformation corresponding to the label of the MLAN, downlink data to besent to an address corresponding to the addressing information of theterminal.

Reference may be made to the function descriptions of the correspondingfunction modules for all related content of each step in the foregoingmethod embodiment. Details are not described herein again.

In this embodiment, the session management network element 110 ispresented in a form of dividing the function modules in an integratedmanner. Herein, the “module” may be a specific ASIC, a circuit, aprocessor that executes one or more software or firmware programs and amemory, an integrated logic circuit, and/or another component that canprovide the foregoing functions. In a simple embodiment, a personskilled in the art may come up with an idea that the session managementnetwork element 110 may use a form shown in FIG. 3 .

For example, the processor 301 in FIG. 3 invokes a computer executioninstruction stored in the memory 303, so that the session managementnetwork element 110 is enabled to perform the data transmission methodin the foregoing method embodiments.

Functions/implementation processes of the processing module 1101 and thetransceiver module 1102 in FIG. 11 may be implemented by the processor301 in FIG. 3 invoking the computer execution instruction stored in thememory 303. Alternatively, functions/implementation processes of theprocessing module 1101 in FIG. 11 may be implemented by the processor301 in FIG. 3 invoking the computer execution instruction stored in thememory 303. Functions/implementation processes of the transceiver module1102 in FIG. 11 may be implemented by the communications interface 304in FIG. 3 .

The session management network element 110 in this embodiment of thisapplication can be configured to perform the foregoing data transmissionmethod. Therefore, for technical effects that can be obtained by thesession management network element 110, refer to the foregoing methodembodiments. Details are not described herein again.

Optionally, an embodiment of this application further provides a chipsystem. The chip system includes a processor, where the processor isconfigured to support a session management network element inimplementing the foregoing data transmission method, for example,determine an uplink data forwarding rule based on an identifier of anMLAN. In a possible design, the chip system further includes a memory.The memory is configured to store a program instruction and data thatare necessary for the session management network element. The memory maynot be in the chip system. The chip system may include a chip, or mayinclude a chip and another discrete device. This is not specificallylimited in this embodiment of this application.

The foregoing embodiments may be all or partially implemented bysoftware, hardware, firmware or any combination thereof. When beingimplemented by a software program, the embodiments may be all orpartially implemented in a form of a computer program product. Thecomputer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on acomputer, the procedure or functions according to the embodiments ofthis application are all or partially generated. The computer may be ageneral-purpose computer, a special-purpose computer, a computernetwork, or another programmable apparatus. The computer instructionsmay be stored in a computer-readable storage medium or may betransmitted from a computer-readable storage medium to anothercomputer-readable storage medium. For example, the computer instructionsmay be transmitted from a website, computer, server, or data center toanother website, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(DSL)) or wireless (for example, infrared, wireless, or microwave)manner. The computer-readable storage medium may be any usable mediumaccessible to a computer, or a data storage device such as a server or adata center, integrating one or more usable media. The usable medium maybe a magnetic medium (for example, a floppy disk, a hard disk, or amagnetic tape), an optical medium (for example, a DVD), a semiconductormedium (for example, a solid state disk (SSD)), or the like.

Although this application is described with reference to theembodiments, in a process of implementing this application that claimsprotection, a person skilled in the art may understand and implementanother variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.In the claims, “comprising” does not exclude another component oranother step, and “a” or “one” does not exclude a case of multiple. Asingle processor or another unit may implement several functionsenumerated in the claims. Some measures are recorded in dependent claimsthat are different from each other, but this does not mean that thesemeasures cannot be combined to produce a better effect.

Although this application is described with reference to specificfeatures and the embodiments thereof, obviously, various modificationsand combinations may be made to them without departing from the spiritand scope of this application. Correspondingly, the specification andaccompanying drawings are merely exemplary description of thisapplication defined by the accompanying claims, and considered as any ofor all modifications, variations, combinations or equivalents that coverthe scope of this application. Obviously, a person skilled in the artcan make various modifications and variations to this applicationwithout departing from the spirit and scope of this application. Thisapplication is intended to cover these modifications and variations ofthis application provided that they fall within the scope of protectiondefined by the following claims and their equivalent technologies.

What is claimed is:
 1. A data transmission method comprising: obtaining,by a session management network element, an identifier of a mobile localarea network (MLAN) associated with a session of a terminal, wherein theidentifier is a data network name (DNN); determining, by the sessionmanagement network element, a label of the MLAN based on the identifier,wherein the label is a network instance identifier; generating, by thesession management network element, an uplink data forwarding rule basedon the label and information about an uplink path corresponding to thesession, wherein the uplink data forwarding rule comprises the label andthe information about the uplink path corresponding to the session, andwherein the information about the uplink path corresponding to thesession is a tunnel identifier of a user plane network element that isallocated for the session; sending, by the session management networkelement, the uplink data forwarding rule to the user plane networkelement, wherein the uplink data forwarding rule instructs the userplane network element to forward, based on routing informationcorresponding to the label, uplink data received on the uplink path;receiving, by the user plane network element, the uplink data forwardingrule; and forwarding, by the user plane network element, the uplink datareceived on the uplink path using the routing information correspondingto the label.
 2. The data transmission method of claim 1, furthercomprising forwarding, by the user plane network element according tothe uplink data forwarding rule, the uplink data based on the routinginformation.
 3. The data transmission method of claim 1, furthercomprising receiving, by the session management network element, arequest message from a mobility management network element, wherein therequest message comprises the identifier.
 4. The data transmissionmethod of claim 1, further comprising: obtaining, by the sessionmanagement network element, a downlink data forwarding rule comprisingthe label and addressing information of the terminal; sending, by thesession management network element, the downlink data forwarding rule tothe user plane network element, wherein the downlink data forwardingrule instructs the user plane network element to forward, based on therouting information, downlink data to be sent to an addresscorresponding to the addressing information of the terminal; andreceiving, by the user plane network element, the downlink dataforwarding rule.
 5. The data transmission method of claim 1, furthercomprising: obtaining, by the session management network element, adownlink data forwarding rule, wherein the downlink data forwarding rulecomprises the label, addressing information of the terminal, andinformation about a downlink path corresponding to the session; andsending, by the session management network element, the downlink dataforwarding rule to the user plane network element, wherein the downlinkdata forwarding rule instructs the user plane network element to updatethe routing information, and forward, based on the downlink path inupdated routing information corresponding to the label, downlink data tobe sent to an address corresponding to the addressing information. 6.The data transmission method of claim 4, wherein the addressinginformation of the terminal comprises an Internet Protocol (IP) addressof the terminal or a media access control (MAC) address of the terminal.7. A data transmission system comprising: a session management networkelement configured to: obtain an identifier of a mobile local areanetwork (MLAN) associated with a session of a terminal, wherein theidentifier is a data network name (DNN); determine a label of the MLANbased on the identifier, wherein the label is a network instanceidentifier; generate an uplink data forwarding rule based on the labeland information about an uplink path corresponding to the session,wherein the uplink data forwarding rule comprises the label and theinformation about the uplink path corresponding to the session, andwherein the information about the uplink path corresponding to thesession is a tunnel identifier of a user plane network element that isallocated for the session; and send the uplink data forwarding rule tothe user plane network element, wherein the uplink data forwarding ruleinstructs the user plane network element to forward, based on routinginformation corresponding to the label, uplink data received on theuplink path; and a user plane network element configured to: receive theuplink data forwarding rule from the session management network element;and forward the uplink data received on the uplink path using therouting information corresponding to the label.
 8. The data transmissionsystem of claim 7, wherein the session management network element isfurther configured to receive a request message from a mobilitymanagement network element, wherein the request message comprises theidentifier.
 9. The data transmission system of claim 7, wherein thesession management network element is further configured to: obtain adownlink data forwarding rule comprising the label and addressinginformation of the terminal; and send the downlink data forwarding ruleto the user plane network element, wherein the downlink data forwardingrule instructs the user plane network element to forward, based on therouting information, downlink data to an address corresponding to theaddressing information, and wherein the user plane network element isfurther configured to receive the downlink data forwarding rule.
 10. Thedata transmission system of claim 7, wherein the session managementnetwork element is further configured to: obtain a downlink dataforwarding rule, wherein the downlink data forwarding rule comprises thelabel of the MLAN, addressing information of the terminal, andinformation about a downlink path corresponding to the session; and sendthe downlink data forwarding rule to the user plane network element,wherein the downlink data forwarding rule instructs the user planenetwork element to update the routing information, and forward, based onthe downlink path in updated routing information corresponding to thelabel, downlink data to be sent to an address corresponding to theaddressing information.
 11. A session management network elementcomprising: at least one processor; and a memory configured to storecomputer-executable instructions that, when executed by the at least oneprocessor, cause the session management network element to: obtain anidentifier of a mobile local area network (MLAN) associated with asession of a terminal, wherein the identifier is a data network name(DNN); determine a label of the MILAN based on the identifier, whereinthe label is a network instance identifier; generate an uplink dataforwarding rule based on the label and information about an uplink pathcorresponding to the session, wherein the uplink data forwarding rulecomprises the label of the MLA and the information about the uplink pathcorresponding to the session, and wherein the information about theuplink path corresponding to the session is a tunnel identifier of auser plane network element that is allocated for the session; and sendthe uplink data forwarding rule to the user plane network element,wherein the uplink data forwarding rule instructs the user plane networkelement to forward, based on routing information corresponding to thelabel, uplink data received on the uplink path.
 12. The sessionmanagement network element of claim 11, wherein the computer-executableinstructions further cause the session management network element toreceive a request message from a mobility management network element,and wherein the request message comprises the identifier.
 13. Thesession management network element of claim 11, wherein thecomputer-executable instructions further cause the session managementnetwork element to: obtain a downlink data forwarding rule comprisingthe label and addressing information of the terminal; and send thedownlink data forwarding rule to the user plane network element, whereinthe downlink data forwarding rule instructs the user plane networkelement to forward, based on the routing information, downlink data tobe sent to an address corresponding to the addressing information. 14.The session management network element of claim 11, wherein thecomputer-executable instructions further cause the session managementnetwork element to: obtain a downlink data forwarding rule, wherein thedownlink data forwarding rule comprises the label, addressinginformation of the terminal, and information about a downlink pathcorresponding to the session; and send the downlink data forwarding ruleto the user plane network element, wherein the downlink data forwardingrule instructs the user plane network element to update the routinginformation, and forward, based on the downlink path in updated routinginformation corresponding to the label, downlink data to be sent to anaddress corresponding to the addressing information.
 15. A datatransmission method comprising: obtaining, by a session managementnetwork element, an identifier of a mobile local area network (MLAN)associated with a session of a terminal, wherein the identifier is adata network name (DNN); determining, by the session management networkelement, a label of the MLAN based on the identifier, wherein the labelis a network instance identifier; generating, by the session managementnetwork element, an uplink data forwarding rule based on the label andinformation about an uplink path corresponding to the session, whereinthe uplink data forwarding rule comprises the label and the informationabout the uplink path corresponding to the session, and wherein theinformation about the uplink path corresponding to the session is atunnel identifier of a user plane network element that is allocated forthe session; and sending, by the session management network element, theuplink data forwarding rule to the user plane network element, whereinthe uplink data forwarding rule instructs the user plane network elementto forward, based on routing information corresponding to the label,uplink data received on the uplink path.
 16. The data transmissionmethod of claim 15, further comprising receiving, by the sessionmanagement network element, a request message from a mobility managementnetwork element, wherein the request message comprises the identifier.17. The data transmission method of claim 15, further comprising:obtaining, by the session management network element, a downlink dataforwarding rule comprising the label and addressing information of theterminal; and sending, by the session management network element, thedownlink data forwarding rule to the user plane network element, whereinthe downlink data forwarding rule instructs the user plane networkelement to forward, based on the routing information, downlink data tobe sent to an address corresponding to the addressing information of theterminal.
 18. The data transmission method of claim 15, furthercomprising: obtaining, by the session management network element, adownlink data forwarding rule, wherein the downlink data forwarding rulecomprises the label, addressing information of the terminal, andinformation about a downlink path corresponding to the session; andsending, by the session management network element, the downlink dataforwarding rule to the user plane network element, wherein the downlinkdata forwarding rule instructs the user plane network element to updatethe routing information and forward, based on the downlink path inupdated routing information corresponding to the label, downlink data tobe sent to an address corresponding to the addressing information. 19.The data transmission method of claim 17, wherein the addressinginformation of the terminal comprises an Internet Protocol (IP) addressof the terminal or a media access control (MAC) address of the terminal.20. A non-transitory storage medium comprising instructions which, whenexecuted by a computer, cause the computer to: obtain an identifier of amobile local area network (MLAN) associated with a session of aterminal, wherein the identifier is a data network name (DNN); obtain alabel of the MLAN based on the identifier, wherein the label is anetwork instance identifier; generate an uplink data forwarding rulebased on the label and information about an uplink path corresponding tothe session, wherein the uplink data forwarding rule comprises the labeland the information about the uplink path corresponding to the session,and wherein the information about the uplink path corresponding to thesession is a tunnel identifier of a user plane network element that isallocated for the session; and send the uplink data forwarding rule tothe user plane network element, wherein the uplink data forwarding ruleinstructs the user plane network element to forward, based on routinginformation corresponding to the label, uplink data received on theuplink path.
 21. The non-transitory storage medium of claim 20, whereinwhen the instructions are executed by the computer, the instructionsfurther cause the computer to: obtain a downlink data forwarding rulecomprising the label and addressing information of the terminal; andsend the downlink data forwarding rule to the user plane networkelement, wherein the downlink data forwarding rule instructs the userplane network element to forward, based on the routing information,downlink data to be sent to an address corresponding to the addressinginformation.
 22. The non-transitory storage medium of claim 20, whereinwhen the instructions are executed by the computer, the instructionsfurther cause the computer to: obtain a downlink data forwarding rule,wherein the downlink data forwarding rule comprises the label,addressing information of the terminal, and information about a downlinkpath corresponding to the session; and send the downlink data forwardingrule to the user plane network element, wherein the downlink dataforwarding rule instructs the user plane network element to update therouting information and forward, based on the downlink path in updatedrouting information corresponding to the label, downlink data to be sentto an address corresponding to the addressing information.
 23. Thenon-transitory storage medium according to claim 21, wherein theaddressing information of the terminal comprises an Internet Protocol(IP) address of the terminal or a media access control (MAC) address ofthe terminal.
 24. The non-transitory storage medium of claim 20, whereinwhen the instructions are executed by the computer, the instructionsfurther cause the computer to receive a request message from a mobilitymanagement network element, wherein the request message comprises theidentifier.
 25. The data transmission method of claim 1, wherein thelabel is different from the identifier.
 26. The data transmission systemof claim 7, wherein the user plane network element is further configuredto forward, according to the uplink data forwarding rule, the uplinkdata based on the routing information.
 27. The data transmission systemof claim 7, wherein the label is different from the identifier.
 28. Thedata transmission system of claim 9, wherein the addressing informationof the terminal comprises an Internet Protocol (IP) address of theterminal or a media access control (MAC) address of the terminal. 29.The session management network element of claim 13, wherein theaddressing information of the terminal comprises an Internet Protocol(IP) address of the terminal or a media access control (MAC) address ofthe terminal.